April 30, 2004
10:20 p.m.
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()).