Walter Dörwald <[EMAIL PROTECTED]> writes:

> Michael Hudson wrote:
>
>> Walter Dörwald <[EMAIL PROTECTED]> 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?

In a new frame, AIUI.

You'll get a different answer for a list comprehension, as I'm sure
you know.

Cheers,
mwh

-- 
  I sense much distrust in you.  Distrust leads to cynicism, cynicism
  leads to bitterness, bitterness leads to the Awareness Of True
  Reality which is referred to by those-who-lack-enlightenment as
  "paranoia".  I approve.    -- David P. Murphy, alt.sysadmin.recovery
_______________________________________________
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