I wrote: > guido wrote: > > This is a (minor) open issue; I'd be happy with requiring > >=20 > > [(x, x*2) for x in seq] >=20 > doesn't really change anything, does it? the (x, x*2) could > still be a value tuple or an assignment target. umm. not sure "assignment target" was the right term here; what I'm trying to say is that you cannot tell what you're parsing until you've seen the "for" keyword. or in other words, the "n" in "when you see 'x', you have to read 'n' more tokens before you can tell what 'x' is" suddenly became much larger... (after all, I've successfully parsed Python code with a very simple non-backtracking recursive-descent parser -- and I'm not sure I can teach that one to recognize list comprehensions...) (and yes, I'm sure this can be expressed in [AELRS]+\(\d+\) notation, but I'm not gonna try ;-) </F>
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