`Py_SETREF` and `Py_NewRef` is not explained in extending new types using a C extension
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
Documentation
The documentation for extending new types using a C extension just uses Py_SETREF and Py_NewRef with no extra clarification as to what those functions do. It'd be nicer and more convenient if they were explained on-the-spot instead of having to search for it in the docs. They are also not explained in the previous topic (that explains Py_INCREF and Py_DECREF) and the other topics thereafter.
Linked PRs
- gh-101234
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the “Providing finer control over data attributes” section of the linked new types tutorial. Explain Py_SETREF and Py_NewRef where they are used, and check the surrounding reference-counting topics for consistent coverage; the documentation is done when readers can understand both functions without searching elsewhere.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100