8 Jul
2005
8 Jul
'05
7:53 a.m.
On 7/7/05, Walter Dörwald
What is still unspecified (or at least not explicitely mentioned) in the PEP is the lifetime of VAR in:
with EXPR as VAR: BLOCK
It is specified well enough IMO -- you're supposed to take the translation into basic Python seriously. That translation specifies a simple assignment to VAR, and that's what I meant (and what I'm sure most folks understood). IOW VAR lives in the surrounding scope, overwrites a previous value, and survives past the with-statement (unless it is set inside of course). -- --Guido van Rossum (home page: http://www.python.org/~guido/)