Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-141004: DocumentPyType_FastSubclass#141313
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
| Return non-zero if the type object *type* sets the subclass flag *flag*. | ||
| Subclass flags are denoted by | ||
| :c:macro:`Py_TPFLAGS_*_SUBCLASS <Py_TPFLAGS_LONG_SUBCLASS>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Let's add a note mentioning that most_Check macros/functions use this.
| These flags are used by functions such as:c:func:`PyType_FastSubclass` and | ||
| :c:func:`PyLong_Check` to quickly determine if a type is a subclass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think this is a little misleading. These are usedwithPyType_FastSubclass, notby it. Let's instead say something like "functions such asPyLong_Check will callPyType_FastSubclass with one of these flags".
Uh oh!
There was an error while loading.Please reload this page.
I think documenting it as a function is better.
📚 Documentation preview 📚:https://cpython-previews--141313.org.readthedocs.build/