8000 Code C API docs should be strong reference not new reference · Issue #97980 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Code C API docs should be strong reference not new reference #97980

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

Closed
Fidget-Spinner opened this issue Oct 6, 2022 · 2 comments
Closed

Code C API docs should be strong reference not new reference #97980

Fidget-Spinner opened this issue Oct 6, 2022 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@Fidget-Spinner
Copy link
Member
Fidget-Spinner commented Oct 6, 2022

These new functions were added in 3.11.

In 3.10 and earlier, accessing the attributes via Python these functions would return a strong reference that was shared, not a brand new reference. So we should relax the terminology and just say strong reference in the docs (to also allow further optimisations in the future).

Continuing from #94936.

@Fidget-Spinner Fidget-Spinner added the docs Documentation in the Doc dir label Oct 6, 2022
@ronaldoussoren
Copy link
Contributor

Isn't "New Reference" used throughout the documentation for functions returning a PyObject* that the caller should DECREF? For example see the documentation for PyObject_GetAttr.

@Fidget-Spinner
Copy link
Member Author

I'm making the terminology consistent with PyCode_GetCode.

@Fidget-Spinner Fidget-Spinner closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants
0