Weak Reference Objects — Python 3.14.7 documentation

docs.python.org

Tin mới

Pickle buffer objects

Python Module Index

3.14.7 Documentation

Python/C API reference manual

Concrete Objects Layer

PyType_SUPPORTS_WEAKREFS()

PyType_SUPPORTS_WEAKREFS() for checking if ob is weakly referenceable.

borrowed reference

Return a borrowed reference to the referenced object from a weak reference, ref. If the referent is no longer live, returns Py_None.

PyTypeObject.tp_dealloc

This function is called by the tp_dealloc handler to clear weak references.