SyntaxError not honoured in list comprehension?

Mark Dickinson dickinsm at gmail.com
Sun Jul 4 05:02:10 EDT 2010


On Jul 4, 9:55 am, Mark Dickinson <dicki... at gmail.com> wrote:
> Why?  If Python itself has no problem parsing this code, why should it
> be so difficult for editors?  Python's grammar is fairly simple:  it's
> LL(1) (unlike C's, for example), so can be parsed with only 1 token of
> lookahead.

Bah.  Ignore the bit about C.  I was thinking that the dangling else
issue made this a problem, but now I'm not sure that's true.

--
Mark



More information about the Python-list mailing list