MCPcopy Index your code
hub / github.com/rocky/python-uncompyle6 / try_except38r3

Function try_except38r3

uncompyle6/semantics/customize38.py:250–264  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

248 # we should be able to get this working as a pure transformation rule,
249 # so no procedure is needed here.
250 def try_except38r3(node):
251 self.template_engine(("%|try:\n%+%c\n%-", (1, "suite_stmts_opt")), node)
252 cond_except_stmts_opt = node[5]
253 assert cond_except_stmts_opt == "cond_except_stmts_opt"
254 for child in cond_except_stmts_opt:
255 if child == "cond_except_stmt":
256 if child[0] == "except_cond1":
257 self.template_engine(
258 ("%c\n", (0, "except_cond1"), (1, "expr")), child
259 )
260 self.template_engine(("%+%c%-\n", (1, "except_stmts")), child)
261 pass
262 pass
263 self.template_engine(("%+%c%-\n", (7, "return")), node)
264 self.prune()
265
266 self.n_try_except38r3 = try_except38r3
267

Callers

nothing calls this directly

Calls 1

template_engineMethod · 0.45

Tested by

no test coverage detected