MCPcopy Index your code
hub / github.com/RustPython/RustPython / make_nested

Method make_nested

Lib/test/test_gc.py:498–504  ·  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

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

Callers

nothing calls this directly

Calls 1

CClass · 0.70

Tested by

no test coverage detected