[Python-Dev] Proposed changes to PEP 343 (original) (raw)

Eric Nieuwland eric.nieuwland at xs4all.nl
Fri Oct 7 15:38:20 CEST 2005


Nick Coghlan wrote:

1. Amend the statement specification such that:

with EXPR as VAR: BLOCK is translated as: abc = (EXPR).with() exc = (None, None, None) VAR = abc.enter() try: try: BLOCK except: exc = sys.excinfo() raise finally: abc.exit(*exc)

Is this correct? What happens to

with 40*13+2 as X:
    print X

?

--eric



More information about the Python-Dev mailing list