bpo-41790: update error in documentation by koubaa · Pull Request #22242 · python/cpython
Open
wants to merge 1 commit into
Conversation
@vstinner @corona10 @shihai1991 I'm sure I have the wrong issue number but wanted to propose this change to the doc. I can change the number and rebase.
@vstinner @corona10 @shihai1991 I'm sure I have the wrong issue number but wanted to propose this change to the doc. I can change the number and rebase.
You have the wrong issue number.
koubaa
changed the title
bpo-1635741: update error in documentation
bpo-41790: update error in documentation
@vstinner @corona10 @shihai1991 I'm sure I have the wrong issue number but wanted to propose this change to the doc. I can change the number and rebase.
You have the wrong issue number.
@vstinner I made a new issue in that case.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@vstinner is anything else needed before merging this?
| declared. The sole exception are the type objects; since these must never be | ||
| deallocated, they are typically static :c:type:`PyTypeObject` objects. | ||
| declared. The sole exception are the type objects; they may be static | ||
| :c:type:`PyTypeObject` objects. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The sole exception are the type objects" looks wrong to me. Almost all types in Python are allocated on the heap.
Only static types are never deallocated.
I'm not sure why these kinds of technical details are giving in an introduction. It would be better to move them to https://docs.python.org/dev/c-api/refcounting.html no?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or at least, copied there.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I am not find the docs of PyHeapTypeObject. Maybe add those description info in it.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not certain what to do with this change. The whole paragraph could be revisited, as Victor hints to. I'm not sure if this change makes things clearer for the reader.
@encukou: thoughts?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be technically correct, it's not just types – PyModuleDef is also a PyObject* (though I assume that's for historical reasons only). But that's too much detail here.
Comment on lines +239 to +240
| declared. The sole exception are the type objects; they may be static | ||
| :c:type:`PyTypeObject` objects. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work?
| declared. The sole exception are the type objects; they may be static | |
| :c:type:`PyTypeObject` objects. | |
| declared. (There are a few exceptions, like static type objects, but even those | |
| are usually manipulated via pointers.) |
kylotan
mannequin
mentioned this pull request
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has merge conflicts now.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.
Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.
koubaa
mannequin
mentioned this pull request