MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / compiler_with

Function compiler_with

Python/compile.c:2940–2994  ·  view source on GitHub ↗

Implements the with statement from PEP 343. The semantics outlined in that PEP are as follows: with EXPR as VAR: BLOCK It is implemented roughly as: context = EXPR exit = context.__exit__ # not calling it value = context.__enter__() try: VAR = value # if VAR present in the syntax BLOCK finally: if an exception was raised: exc = copy

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

compiler_visit_stmtFunction · 0.85

Calls 4

compiler_new_blockFunction · 0.85
compiler_use_next_blockFunction · 0.85
compiler_push_fblockFunction · 0.85
compiler_pop_fblockFunction · 0.85

Tested by

no test coverage detected