forked from Rust-related/RustPython
14 lines
103 B
Python
14 lines
103 B
Python
from _weakref import ref
|
|
|
|
|
|
class X:
|
|
pass
|
|
|
|
|
|
a = X()
|
|
b = ref(a)
|
|
|
|
assert callable(b)
|
|
assert b() is a
|
|
|