[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ideas
Subject:    Re: [Python-ideas] Tuple Comprehensions
From:       Nick Coghlan <ncoghlan () gmail ! com>
Date:       2011-10-18 6:49:15
Message-ID: CADiSq7cuvkp7PD_ya_+kR3xTUob_pQGxWpEg0TpMW0O3_VDKZA () mail ! gmail ! com
[Download RAW message or body]

On Tue, Oct 18, 2011 at 3:47 PM, Ben Finney <ben+python@benfinney.id.au> wr=
ote:
> Nick Coghlan <ncoghlan@gmail.com> writes:
>
>> On Tue, Oct 18, 2011 at 2:57 PM, Ben Finney <ben+python@benfinney.id.au>=
 wrote:
>> > More precisely, the parens are not part of the syntax for generator
>> > expressions.
>>
>> Yes they are.
>
> I had the impression that they could appear as a bare expression without
> parens. But the Python interpreter doesn't support that impression, so I
> guess I was wrong. Thanks for pointing it out.

You may have been thinking of yield expressions, where the parentheses
aren't technically part of the syntax, but are still mandatory in a
lot of places to avoid visual ambiguity.

Cheers,
Nick.

-- =

Nick Coghlan=A0=A0 |=A0=A0 ncoghlan@gmail.com=A0=A0 |=A0=A0 Brisbane, Austr=
alia
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic