iterators (was: python-dev summary)

Marcin 'Qrczak' Kowalczyk qrczak at
Thu Feb 22 17:08:12 CET 2001

21 Feb 2001 09:32:35 -0800, Don Dwiggins <dwig at> 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
  ^^                      SYGNATURA ZASTĘPCZA

More information about the Python-list mailing list