Greg Ewing wrote: > Alex Martelli wrote: >> LCs were originally designed to leak > > Well, they weren't really *designed* to leak, it was > just a side effect of the implementation. > > It seems to have been decided that it was better to > keep it that way than risk breaking things that might > depend on it. Personally I would rather have had it > documented as "undefined".
Genexps don't leak their iteration variables, and neither do Py3k list comps. So it has only been kept that way in 2.x because nobody came up with a graceful way of deprecating it in the past and "list(genexp)" is now available as a trivial workaround. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com