[Python-Dev] Using and binding relative names (was Re: PEP for Better Control of Nested Lexical Scopes) (original) (raw)
Thomas Wouters thomas at xs4all.net
Sun Feb 26 18:14:18 CET 2006
- Previous message: [Python-Dev] Using and binding relative names (was Re: PEP for Better Control of Nested Lexical Scopes)
- Next message: [Python-Dev] Exposing the abstract syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Feb 26, 2006 at 03:27:34PM +0100, Massimiliano Leoni wrote:
Why would you change the Python scoping rules, instead of using the function attributes, available from release 2.1 (PEP 232) ?
Because closures allow for data that isn't trivially reachable by the caller (or anyone but the function itself.) You can argue that that's unpythonic or what not, but fact is that the current closures allow that.
-- Thomas Wouters <thomas at xs4all.net>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!
- Previous message: [Python-Dev] Using and binding relative names (was Re: PEP for Better Control of Nested Lexical Scopes)
- Next message: [Python-Dev] Exposing the abstract syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]