a break for comprehensions
Peter Hansen
peter at engcorp.com
Mon Jul 30 20:52:23 EDT 2001
Steve Holden wrote:
>
> I believe a separate syntax would be required to represent such a radically
> different object. But you, of course, may know better ... if you're looking
> for a syntax, one possibility would be:
>
> [[x * 2 for x in g()]]
If that doesn't refer to a list comprehension formed inside another list,
you'd be well on your way to reinventing another language whose name begins
with P...
--
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com
More information about the Python-list
mailing list