Skip to content

Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation #135323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Jun 10, 2025

  1. Clarify that the object isn't immediately deallocated when the interpreter is done with it.
  2. Fix the documented return value; it's documented as returning 1 when DRC is already enabled, but it actually returns 0.
  3. Mention the tp_new slot, where it should generally be used.

📚 Documentation preview 📚: https://cpython-previews--135323.org.readthedocs.build/en/135323/c-api/object.html#c.PyUnstable_Object_EnableDeferredRefcount

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant