On Apr 5, 2005 2:04 AM, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > [Steven Bethard] > > So do I read this right in preferring > > [<x> for <y> in <z>] > > over > > list(<x> for <y> in <z>) > > Yes!
Why? (Serious question. I'm sure that you have a good reason - I just can't figure out what it is.) The generator expression has the advantage of not leaking references into the enclosing namespace. What's advantage of the list comp? -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list