From: "Guido van Rossum" <[EMAIL PROTECTED]>
The new failure in 3.0 is a side effect of the translation (mostly) of
list comps into genexps. The underlying problem is that the genexp
creates a function scope, and function scopes don't have access to the
surrounding class body scope. (There's a really good but extremely
subtle reason for that.)

Would you be open to an alternate implementation for list/set/dict comps
that doesn't use a genexps? That would solve the scope problem, the performance hit, and make tracing more straight-forward.

If you're open to it, I can see if the EuroPython sprinters can find an implementation closer to what we had before but using the compiler to create an invisible induction variable.

Not sure if the current implementation was really a winning trade. It may have been better to have the minor but easy to explain nuisance
of exposing the induction variable instead of having the harder-to-explain
subtleties associated with a slower underlying genexp.


Raymond
_______________________________________________
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

Reply via email to