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

Ben Finney bignose+hates-spam at benfinney.id.au
Tue Nov 4 21:18:27 EST 2008


Marc 'BlackJack' Rintsch <bj_666 at gmx.net> writes:

> On Wed, 05 Nov 2008 12:06:42 +1100, Ben Finney wrote:
> 
> > Falcolas <garrickp at gmail.com> writes:
> > 
> >> Using the surrounding parentheses creates a generator object
> > 
> > No. Using the generator expression syntax creates a generator
> > object.
> > 
> > Parentheses are irrelevant to whether the expression is a
> > generator expression. The parentheses merely group the expression
> > from surrounding syntax.
> 
> No they are important:

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.

-- 
 \                 “Today, I was — no, that wasn't me.” —Steven Wright |
  `\                                                                   |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list