[Python-Dev] 'With' context documentation draft (was Re: Terminology for PEP 343

Walter Dörwald walter at livinglogic.de
Fri Jul 8 13:48:27 CEST 2005


Michael Hudson wrote:

> Walter Dörwald <walter at livinglogic.de> writes:
> [...]
>>I.e. will VAR still exist after the end of the block with its value
>>the return value of __enter__() or will it revert to the previous
>>value (if any)?
> 
> Eh, no.  Where would you store the old value?

I don't know, where does:

 >>> x = 42
 >>> "".join(chr(x) for x in xrange(10))
'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t'
 >>> x
42

store it?

 > [...]

Bye,
    Walter Dörwald


More information about the Python-Dev mailing list