A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-May/100454.html below:

[Python-Dev] variable name resolution in exec is incorrect

[Python-Dev] variable name resolution in exec is incorrect [Python-Dev] variable name resolution in exec is incorrectNick Coghlan ncoghlan at gmail.com
Sat May 29 14:13:24 CEST 2010
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   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4