[Python-Dev] PEP for Better Control of Nested Lexical Scopes (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 22 01:35:32 CET 2006
- Previous message: [Python-Dev] PEP for Better Control of Nested Lexical Scopes
- Next message: [Python-Dev] PEP for Better Control of Nested Lexical Scopes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jeremy Hylton wrote:
On 2/21/06, Jeremy Hylton <jeremy at alum.mit.edu> wrote:
On 2/21/06, Bengt Richter <bokr at oz.net> wrote:
But to the topic, it just occurred to me that any outer scopes could be given names (including global namespace, but that would have the name global by default, so global.x would essentially mean what globals()['x'] means now, except it would be a name error if x didn't pre-exist when accessed via namespacename.nameinspace notation. Isn't this suggestion that same as Greg Ewing's?
It's not quite the same, because in my scheme the namespace statement creates a new namespace embedded in the scope where it appears, whereas Bengt's one seems to just give a name to the scope itself.
I'm not really in favour of either of these -- I'd be just as happy with a simple 'outer' statement.
-- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiam! | Christchurch, New Zealand | (I'm not a morning person.) | greg.ewing at canterbury.ac.nz +--------------------------------------+
- Previous message: [Python-Dev] PEP for Better Control of Nested Lexical Scopes
- Next message: [Python-Dev] PEP for Better Control of Nested Lexical Scopes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]