MCPcopy Index your code
hub / github.com/python/cpython / delimit

Method delimit

Lib/_ast_unparse.py:133–139  ·  view source on GitHub ↗

A context manager for preparing the source for expressions. It adds *start* to the buffer and enters, after exit it adds *end*.

(self, start, end)

Source from the content-addressed store, hash-verified

131
132 @contextmanager
133 def delimit(self, start, end):
134 """A context manager for preparing the source for expressions. It adds
135 *start* to the buffer and enters, after exit it adds *end*."""
136
137 self.write(start)
138 yield
139 self.write(end)
140
141 def delimit_if(self, start, end, condition):
142 if condition:

Callers 15

delimit_ifMethod · 0.95
visit_FunctionTypeMethod · 0.95
_function_helperMethod · 0.95
_type_params_helperMethod · 0.95
_write_interpolationMethod · 0.95
visit_ConstantMethod · 0.95
visit_ListMethod · 0.95
visit_ListCompMethod · 0.95
visit_GeneratorExpMethod · 0.95
visit_SetCompMethod · 0.95
visit_DictCompMethod · 0.95
visit_SetMethod · 0.95

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected