mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
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
|
|
|