top of page
Search

PYTHON CODING

  • Writer: waclaw_koscielniak
    waclaw_koscielniak
  • Sep 8
  • 1 min read

import weakref

class A: pass

a = A()

r = weakref.ref(a)

print(r() is a)

del a

print(r() is None)


[Running] python3 -u "/Users/name/test/test472.py"

True

True

[Done] exited with code=0 in 0.058 seconds


Try to run it.
Try to run it.

 
 
 

1 Comment


Guest
Sep 08

Try to run it to verify.

Like
bottom of page