[Python-ideas] Tuple Comprehensions

Nick Coghlan ncoghlan at gmail.com
Tue Oct 18 07:27:12 CEST 2011


On Tue, Oct 18, 2011 at 2:57 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> More precisely, the parens are not part of the syntax for generator
> expressions.

Yes they are. There's just an exception in the grammar to make it so
that the *existing* parens that indicate a function call also count
when a generator expression is the sole positional argument.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-ideas mailing list