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

Method __init__

Tools/clinic/libclinic/dsl_parser.py:269–284  ·  view source on GitHub ↗
(self, clinic: Clinic)

Source from the content-addressed store, hash-verified

267 permit_long_docstring_body = False
268
269 def __init__(self, clinic: Clinic) -> None:
270 self.clinic = clinic
271
272 self.directives = {}
273 for name in dir(self):
274 # functions that start with directive_ are added to directives
275 _, s, key = name.partition("directive_")
276 if s:
277 self.directives[key] = getattr(self, name)
278
279 # functions that start with at_ are too, with an @ in front
280 _, s, key = name.partition("at_")
281 if s:
282 self.directives['@' + key] = getattr(self, name)
283
284 self.reset()
285
286 def reset(self) -> None:
287 self.function = None

Callers

nothing calls this directly

Calls 2

resetMethod · 0.95
partitionMethod · 0.45

Tested by

no test coverage detected