RIIA in Python 2.5 alpha: "with... as"

Ben Cartwright bencvt at gmail.com
Tue Apr 11 21:43:28 EDT 2006


Terry Reedy wrote:
> "Alexander Myodov" <maa_subscriptions at sinn.ru> wrote in message
> news:178359972.20060411145606 at sinn.ru...
> > and even list comprehensions:
> >  b1 = [l for l in a1]
> >  print "l: %s" % l
>
> This will go away in 3.0.  For now, del l if you wish.

Or use a generator expression:
  >>> b1 = list(l for l in a1)
  >>> l
  NameError: name 'l' is not defined

--Ben




More information about the Python-list mailing list