[Python-Dev] Re: [Patches] [Patch #101175] Fix slight bug in the Ref manual docs on listcomprehensions
Tim Peters
tim_one@email.msn.com
Tue, 15 Aug 2000 21:26:36 -0400
[Tim]
> [x if 6] should not be a legal expression but the grammar
> allows it today.
[Greg Ewing]
> Why shouldn't it be legal?
Because Guido hates it. It's almost certainly an error on the part of the
user; really the same reason that zip() without arguments raises an
exception.
> ...
> Excluding it will make both the implementation and documentation
> more complicated,
Of course, but marginally so. "The first clause must be an iterator"; end
of doc changes.
> with no benefit that I can see.
Catching likely errors is a benefit for the user. I realize that Haskell
does allow it -- although that would be a surprise to most Haskell users
<wink>.