You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
documentation of tp_alloc and tp_free inheritance for heap types is incorrect #160749
For static subtypes, this slot is inherited (see above).
The information for heap subtypes is not correct. If not set, the slot is inherited in inherit_slots unconditionally.
It appears that "heap subtypes" in this statement might incorrectly refer to those allocated by type() or class Python operations rather than via C-API constructors.
tp_free seems to have a similar issue. The documentation for "static types" seems to again apply to all types constructed through the C API, whether a static or heap type. The documentation for "heap types" seems to instead apply to Python-created types.
Should the behaviour be adjusted to match documentation, or the documentation corrected? cc @encukou@vstinner
Activity