Is there a better/simpler way to filter blank lines?

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Tue Nov 4 22:25:04 EST 2008


On Wed, 05 Nov 2008 13:18:27 +1100, Ben Finney wrote:

> Marc 'BlackJack' Rintsch <bj_666 at gmx.net> writes:
> 
> Your example shows only that they're important for grouping the
> expression from surrounding syntax. As I said.
> 
> They are *not* important for making the expresison be a generator
> expression in the first place. Parentheses are irrelevant for the
> generator expression syntax.

Okay, technically correct but parenthesis belong to generator expressions 
because they have to be there to separate them from surrounding syntax 
with the exception when there are already enclosing parentheses.  So 
parenthesis are tied to generator expression syntax.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list