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

Method __init__

Lib/test/test_gc.py:56–64  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 # I.gc_happened is false.
55
56 def __init__(self):
57 self.gc_happened = False
58
59 def it_happened(ignored):
60 self.gc_happened = True
61
62 # Create a piece of cyclic trash that triggers it_happened when
63 # gc collects it.
64 self.wr = weakref.ref(C1055820(666), it_happened)
65
66@with_tp_del
67class Uncollectable(object):

Callers

nothing calls this directly

Calls 1

C1055820Class · 0.85

Tested by

no test coverage detected