[Python-Dev] variable name resolution in exec is incorrect (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Thu May 27 18:08:02 CEST 2010
- Previous message: [Python-Dev] variable name resolution in exec is incorrect
- Next message: [Python-Dev] variable name resolution in exec is incorrect
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 27/05/10 13:13, Greg Ewing wrote:
The way that functions get access to names in enclosing local scopes is by having them passed in as cells, but that mechanism is only available for optimised local namespaces, not ones implemented as dicts.
I believe exec already includes the tapdancing needed to make that work.
As Guido pointed out, it's the ability to generate closures directly from a source string that is currently missing.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] variable name resolution in exec is incorrect
- Next message: [Python-Dev] variable name resolution in exec is incorrect
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]