Jeremy Hylton wrote:
> On 2/21/06, Jeremy Hylton <[EMAIL PROTECTED]> wrote:
> 
>>On 2/21/06, Bengt Richter <[EMAIL PROTECTED]> 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 
>>>namespace_name.name_in_space 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.)          |
[EMAIL PROTECTED]          +--------------------------------------+
_______________________________________________
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

Reply via email to