On 29/05/10 20:20, Colin H wrote:
Perhaps the next step is to re-open the issue? If it is seen as a bug, it would be great to see a fix in 2.6+ - a number of options which will not break backward compatibility have been put forward - cheers,
A new feature request requesting a "closure" mode for compile() in 3.2 would probably be the best way forward. Once that is done, then the question of if or when to change the default behaviour for auto-compiled code in exec and/or dis can be considered.
It definitely isn't a bug fix though - it's worked this way for years, and while the existing semantics can certainly be surprising, they're far from being buggy (as Thomas said, prior to the introduction of lexical scoping all Python namespaces worked this way).
Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com