-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-105227: Add PyType_GetDict() #105747
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
Merged
Merged
gh-105227: Add PyType_GetDict() #105747
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
49f5e75
Add PyType_GetDict().
ericsnowcurrently 60d611e
Add docs.
ericsnowcurrently 718bbb6
Add a NEWS entry.
ericsnowcurrently 269738d
Fix a typo.
ericsnowcurrently ac9a071
Docs: Mark this for general use (better than reading tp_dict directly!)
encukou 8368595
Linkify the NEWS entry
encukou 23b3a41
Add a rudimentary test
encukou 7ed5d86
Docs: Revert the <<>> in the summary -- the info is in prose for now
encukou 8d9b9ff
Merge in the main branch
encukou 97e1d9c
Formatting nit
encukou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/C API/2023-06-13-14-24-55.gh-issue-105227.HDL9aF.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The new :c:func:`PyType_GetDict` provides the dictionary for the given type | ||
object that is normally exposed by ``cls.__dict__``. Normally it's | ||
sufficient to use :c:member:`~PyTypeObject.tp_dict`, but for the static | ||
builtin types :c:member:`!tp_dict` is now always ``NULL``. :c:func:`!PyType_GetDict()` | ||
provides the correct dict object instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Sorry for the post merge review, but FYI, there's a directive for implementation details:
.. impl-detail::