# Pastebin aNaV0tQ1 ~ $ python Python 3.11.5 (main, Aug 30 2023, 00:13:08) [Clang 14.0.7 (https://android.googlesource.com/toolchain/llvm-project 4c603efb0 on linux Type "help", "copyright", "credits" or "license" for more information. >>> class A: pass ... >>> def foo(a): ... a = weakref.ref(a) ... assert a() is None ... >>> import weakref >>> foo(A()) >>>