iterators (was: python-dev summary)

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Feb 22 11:08:12 EST 2001


21 Feb 2001 09:32:35 -0800, Don Dwiggins <dwig at advancedmp.net> pisze:

> Actually, you can already do it Prolog-style:
>   (_, _, _, ThingIWant, OtherthingIWant, _) = funcreturning6_tuple()

Except that the object bound to _ will be retained until the function
returns or _ is rebound.

Unfortunately the interpreter is probably not allowed to optimize
it out by realizing that this variable is never referenced, because
somebody might want to rely on the fact that the destructor is not
called too early. I wish it was allowed to optimize it out. Or is
it already? Relying on the moment of calling a destructor is evil.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list