MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / delimit_if

Method delimit_if

tools/python-3.11.9-amd64/Lib/ast.py:766–770  ·  view source on GitHub ↗
(self, start, end, condition)

Source from the content-addressed store, hash-verified

764 self.write(end)
765
766 def delimit_if(self, start, end, condition):
767 if condition:
768 return self.delimit(start, end)
769 else:
770 return nullcontext()
771
772 def require_parens(self, precedence, node):
773 """Shortcut to adding precedence related parens"""

Callers 4

require_parensMethod · 0.95
visit_AnnAssignMethod · 0.95
visit_ClassDefMethod · 0.95
visit_TupleMethod · 0.95

Calls 2

delimitMethod · 0.95
nullcontextClass · 0.90

Tested by

no test coverage detected