Skipping execution of -with- block
According to PEP-343, a with statement translates from: with EXPR as VAR: BLOCK to: mgr = (EXPR) exit = type(mgr).__exit__ # Not calling it yet value = type(mgr).__enter__(mgr) exc = True try: try: VAR = value # Only if “as VAR” is present BLOCK except: # The exceptional case is handled here exc = False … Read more