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

Class DetectDelete

Lib/test/test_generators.py:307–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305 def test_close_clears_frame(self):
306 # gh-142766: Test that closing a generator clears its frame
307 class DetectDelete:
308 def __init__(self):
309 DetectDelete.deleted = False
310
311 def __del__(self):
312 DetectDelete.deleted = True
313
314 def generator(arg):
315 yield

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…