MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / subscope

Function subscope

10_smart_pointers/python/rc.py:13–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11 print("refcount of rc_a", sys.getrefcount(rc_a))
12
13 def subscope():
14 rc_b = rc_a
15 print("refcount of rc_b", sys.getrefcount(rc_b))
16 print("refcount of rc_a", sys.getrefcount(rc_a))
17 print("refcount of rc_examples", sys.getrefcount(rc_examples))
18
19 subscope()
20 print("refcount of rc_examples after del rc_b", sys.getrefcount(rc_examples))

Callers 1

scopeFunction · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected