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

Method make_nested

Lib/test/test_gc.py:494–500  ·  view source on GitHub ↗

Create a sufficiently nested container object so that the trashcan mechanism is invoked when deallocating it.

()

Source from the content-addressed store, hash-verified

492 # to call list_dealloc, which also uses the trashcan mechanism.
493
494 def make_nested():
495 """Create a sufficiently nested container object so that the
496 trashcan mechanism is invoked when deallocating it."""
497 x = C([])
498 for i in range(NESTING):
499 x = [C([x])]
500 del x
501
502 def run_thread():
503 """Exercise make_nested() in a loop."""

Callers

nothing calls this directly

Calls 1

CClass · 0.70

Tested by

no test coverage detected