[Python-Dev] Re: PEP 289 - Generator Expressions MoveForward (original) (raw)
Tim Peters tim.one at comcast.net
Fri Apr 30 18:20:55 EDT 2004
- Previous message: [Python-Dev] Re: PEP 289 - Generator Expressions - Let's MoveForward
- Next message: [Python-Dev] PEP 289 - Generator Expressions - Let's Move Forward
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Listcomps can be deprecated, although not all existing uses of listcomps will translate directly into genexps.
[David Eppstein]
Not all? When would [listcomp] ever not be replaceable by list(gencomp)?
The point of Armin's original msg in this thread was that direct replacement can have different semantics. Applying a transformation (via list()) is a different story, although I expect someone obsessed enough could concoct an example that worked differently, because genexp guts truly live in a different scope than listcomp guts (e.g., play games with locals()).
- Previous message: [Python-Dev] Re: PEP 289 - Generator Expressions - Let's MoveForward
- Next message: [Python-Dev] PEP 289 - Generator Expressions - Let's Move Forward
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]