On Tue, Apr 25, 2006, Guido van Rossum wrote:
> On 4/24/06, Aahz <[EMAIL PROTECTED]> wrote:
>>
>> Let's go back to a pseudo-coded with statement:
>>
>>     with EXPRESSION [as NAME]:
>>         BLOCK
>>
>> What happens while BLOCK is being executed?  Again, here's what I said
>> originally:
>>
>>     EXPRESSION returns a value that the with statement uses to create a
>>     context (a special kind of namespace).  The context is used to
>>     execute the BLOCK.  The block might end normally, get terminated by
>>     a break or return, or raise an exception. No matter which of those
>>     things happens, the context contains code to clean up after the
>>     block.
> 
> I strongly object to your use of the term "namespace" here. The with
> statement does *not* create a new namespace. Using the term namespace
> will only confuse people who understand what it means (in Python) --
> we have the global namespace, the builtin namespace, the local
> namespace, classes introduce a new namespace, etc. The with-statement
> does *not* create a namespace in this sense -- there's no new place
> where name lookup can take place. 

Right -- I've already been chastised for that.  Unless someone has a
better idea, I'm going to call it a "wrapper".
-- 
Aahz ([EMAIL PROTECTED])           <*>         http://www.pythoncraft.com/

"Argue for your limitations, and sure enough they're yours."  --Richard Bach
_______________________________________________
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