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

Method __repr__

Lib/test/test_functools.py:535–543  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

533 self.triggered = False
534
535 def __repr__(self):
536 if not self.triggered and g_partial is not None:
537 self.triggered = True
538 new_args_tuple = (None,)
539 new_keywords_dict = {"keyword": None}
540 new_tuple_state = (Function("new_function"), new_args_tuple, new_keywords_dict, None)
541 g_partial.__setstate__(new_tuple_state)
542 gc.collect()
543 return f"EvilObject"
544
545 trigger = EvilObject()
546 func = Function("old_function")

Callers

nothing calls this directly

Calls 3

FunctionClass · 0.70
__setstate__Method · 0.45
collectMethod · 0.45

Tested by

no test coverage detected