Michael Hudson: >> PEP 318 is likely to change the BNF productions for funcdef, >> so I was taking a look at what is there right now. > Um, you do realise that this BNF is purely documentational? I realize that documentation is purely documentational. I didn't understand why this particular rule [all keywords arguments after all purely positional arguments] was left out of the pseudo-code and mentioned only in text. I also wondered why the parameter_list rule was so long and convoluted; one possible path is (defparameter ",")* (defparameter [","]) In general, python documentation is either missing or very good. If *this* was the best explanation, then there was a problem with my mental model, and I wanted to know what I was missing. I suggested possible reasons in an attempt to clarify my question. Guido explained by correcting my assumptions about what had to be unambiguous when. Under the current production, "(a" is ambiguous only over which defparameter (in the same production) the "a" represents. Under my formulation, it would be ambiguous whether "a" was a defparameter or a (regular) parameter, which are different productions. Looking ahead for the "=" violates a no-lookahead rule. -jJ
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4