This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Expose indexing and other simple operations on dict-keys in internal API
Type: Stage: resolved
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Mark.Shannon Nosy List: Mark.Shannon
Priority: normal Keywords: patch

Created on 2021-09-16 11:21 by Mark.Shannon, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 28389 merged Mark.Shannon, 2021-09-16 16:00
Messages (2)
msg401936 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2021-09-16 11:21
Specialization and other optimizations rely on shared dictionary key properties (version number, no deletions, etc).
However checking those properties during specialization is tricky and rather clunky as the dict-keys can only be tested indirectly through a dictionary.

We should add a few internal API functions. Specifically we want to know:

Is a key in a dict-keys?
What index is that key at?
Is a dict-keys all unicode?
msg402037 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2021-09-17 11:20
New changeset 064464fc38269e70f7e3a34cb25fc9085ab85782 by Mark Shannon in branch 'main':
bpo-45219: Factor dictkey indexing (GH-28389)
https://github.com/python/cpython/commit/064464fc38269e70f7e3a34cb25fc9085ab85782
History
Date User Action Args
2022-04-11 14:59:50adminsetgithub: 89382
2021-09-17 11:21:36Mark.Shannonsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-09-17 11:20:55Mark.Shannonsetmessages: + msg402037
2021-09-16 16:00:15Mark.Shannonsetkeywords: + patch
stage: patch review
pull_requests: + pull_request26802
2021-09-16 11:21:18Mark.Shannoncreate