FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-141004: Document C APIs for dictionary keys, values, and items by ZeroIntensity · Pull Request #141009 · python/cpython · GitHub

/ cpython Public

gh-141004: Document C APIs for dictionary keys, values, and items - #141009

Merged
ZeroIntensity merged 7 commits into
python:mainfrom
ZeroIntensity:document-missing-dict
Nov 13, 2025
Merged

gh-141004: Document C APIs for dictionary keys, values, and items#141009
ZeroIntensity merged 7 commits into
python:mainfrom
ZeroIntensity:document-missing-dict

Conversation

ZeroIntensity commented Nov 4, 2025
edited
Loading

Copy link
Copy Markdown
Member

bedevere-app Bot added awaiting core review docs Documentation in the Doc dir skip news labels Nov 4, 2025
github-project-automation Bot moved this to Todo in Docs PRs Nov 4, 2025
ZeroIntensity added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Nov 4, 2025
Comment thread Doc/c-api/dict.rst Outdated
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Comment thread Doc/c-api/dict.rst Outdated
Comment thread Doc/c-api/dict.rst Outdated
Comment thread Doc/c-api/dict.rst Outdated

Copy link
Copy Markdown
Member Author

@encukou, this PR is blocking #141136. Are you happy with this?

Comment thread Doc/c-api/dict.rst Outdated

.. c:function:: int PyDictViewSet_Check(PyObject *o)

Return true if *o* is a view of a set inside a dictionary. This is currently

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can we use "op" for the argument as we use it everywhere else for "object pointer"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

TIL that's what it stood for, I thought it was "operand". I'll update it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done.

picnixz Nov 12, 2025
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

FTR there are other occurrences below

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ah, right. Fixed those too.

Comment thread Doc/c-api/dict.rst
.. c:var:: PyTypeObject PyDictItems_Type

Type object for a view of dictionary items. In Python, this is the type of
the object returned by :meth:`dict.items`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Don't we have collections.abc.DictViewSomething? or types.*?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We do, but I'm not sure it's worth pointing to it here, because there's no actual correlation between the two types at runtime.

encukou left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please consider:

  • a table to avoid repetitive prose
  • a single “Dict view objects” section with all these and PyDictViewSet_Check

But, the PR is an improvement as is.

Copy link
Copy Markdown
Member Author

a single “Dict view objects” section with all these and PyDictViewSet_Check

I like that idea, I went with that. I'm not too sure how I would format this under a table.

ZeroIntensity enabled auto-merge (squash) November 13, 2025 14:57
ZeroIntensity merged commit f72768f into python:main Nov 13, 2025
28 checks passed
ZeroIntensity deleted the document-missing-dict branch November 13, 2025 15:02
github-project-automation Bot moved this from Todo to Done in Docs PRs Nov 13, 2025

Copy link
Copy Markdown

Thanks @ZeroIntensity for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 13, 2025
…ms (pythonGH-141009)

(cherry picked from commit f72768f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>

bedevere-app Bot commented Nov 13, 2025

Copy link
Copy Markdown

GH-141512 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Nov 13, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 13, 2025
…ms (pythonGH-141009)

(cherry picked from commit f72768f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>

bedevere-app Bot commented Nov 13, 2025

Copy link
Copy Markdown

GH-141513 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Nov 13, 2025
ZeroIntensity added a commit that referenced this pull request Nov 13, 2025
…ems (GH-141009) (GH-141512)

gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009)
(cherry picked from commit f72768f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
ZeroIntensity added a commit that referenced this pull request Nov 13, 2025
…ems (GH-141009) (GH-141513)

gh-141004: Document C APIs for dictionary keys, values, and items (GH-141009)
(cherry picked from commit f72768f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Nov 13, 2025
* main: (463 commits)
  pythongh-140601: Add ResourceWarning to iterparse when not closed (pythonGH-140603)
  pythongh-137969: Fix double evaluation of `ForwardRef`s which rely on globals (python#140974)
  pythongh-139109: A new tracing JIT compiler frontend for CPython (pythonGH-140310)
  pythongh-141004: Document `PyErr_RangedSyntaxLocationObject` (python#141521)
  pythongh-140873: Add support of non-descriptor callables in functools.singledispatchmethod() (pythonGH-140884)
  pythongh-139653: Add PyUnstable_ThreadState_SetStackProtection() (python#139668)
  pythongh-141004: Document `PyCode_Optimize` (pythonGH-141378)
  pythongh-141004: Document C APIs for dictionary keys, values, and items (pythonGH-141009)
  pythongh-137959: Fix `TIER1_TO_TIER2` macro name in JIT InternalDocs (pythonGH-141496)
  pythongh-139871: Add `bytearray.take_bytes([n])` to efficiently extract `bytes` (pythonGH-140128)
  pythongh-140601: Refactor ElementTree.iterparse() tests (pythonGH-141499)
  pythongh-135801: Add the module parameter to compile() etc (pythonGH-139652)
  pythongh-140260: fix data race in `_struct` module initialization with subinterpreters (python#140909)
  pythongh-137109: refactor warning about threads when forking (python#141438)
  pythongh-141004: Document `PyRun_InteractiveOneObject` (pythonGH-141405)
  pythongh-124111: Fix TCL 9 thread detection (pythonGH-128103)
  pythongh-141442: Add escaping to iOS testbed arguments (python#141443)
  pythongh-140936: Fix JIT assertion crash at finalization if some generator is alive (pythonGH-140969)
  Add details about JIT build infrastructure and updating dependencies to `Tools/jit` (python#141167)
  pythongh-141412: Use reliable target URL for urllib example (pythonGH-141428)
  ...
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Nov 14, 2025
* 'main' of github.com:python/cpython: (464 commits)
  pythongh-140601: Add ResourceWarning to iterparse when not closed (pythonGH-140603)
  pythongh-137969: Fix double evaluation of `ForwardRef`s which rely on globals (python#140974)
  pythongh-139109: A new tracing JIT compiler frontend for CPython (pythonGH-140310)
  pythongh-141004: Document `PyErr_RangedSyntaxLocationObject` (python#141521)
  pythongh-140873: Add support of non-descriptor callables in functools.singledispatchmethod() (pythonGH-140884)
  pythongh-139653: Add PyUnstable_ThreadState_SetStackProtection() (python#139668)
  pythongh-141004: Document `PyCode_Optimize` (pythonGH-141378)
  pythongh-141004: Document C APIs for dictionary keys, values, and items (pythonGH-141009)
  pythongh-137959: Fix `TIER1_TO_TIER2` macro name in JIT InternalDocs (pythonGH-141496)
  pythongh-139871: Add `bytearray.take_bytes([n])` to efficiently extract `bytes` (pythonGH-140128)
  pythongh-140601: Refactor ElementTree.iterparse() tests (pythonGH-141499)
  pythongh-135801: Add the module parameter to compile() etc (pythonGH-139652)
  pythongh-140260: fix data race in `_struct` module initialization with subinterpreters (python#140909)
  pythongh-137109: refactor warning about threads when forking (python#141438)
  pythongh-141004: Document `PyRun_InteractiveOneObject` (pythonGH-141405)
  pythongh-124111: Fix TCL 9 thread detection (pythonGH-128103)
  pythongh-141442: Add escaping to iOS testbed arguments (python#141443)
  pythongh-140936: Fix JIT assertion crash at finalization if some generator is alive (pythonGH-140969)
  Add details about JIT build infrastructure and updating dependencies to `Tools/jit` (python#141167)
  pythongh-141412: Use reliable target URL for urllib example (pythonGH-141428)
  ...
CuriousLearner added a commit to CuriousLearner/cpython that referenced this pull request Nov 14, 2025
* 'main' of github.com:python/cpython: (464 commits)
  pythongh-140601: Add ResourceWarning to iterparse when not closed (pythonGH-140603)
  pythongh-137969: Fix double evaluation of `ForwardRef`s which rely on globals (python#140974)
  pythongh-139109: A new tracing JIT compiler frontend for CPython (pythonGH-140310)
  pythongh-141004: Document `PyErr_RangedSyntaxLocationObject` (python#141521)
  pythongh-140873: Add support of non-descriptor callables in functools.singledispatchmethod() (pythonGH-140884)
  pythongh-139653: Add PyUnstable_ThreadState_SetStackProtection() (python#139668)
  pythongh-141004: Document `PyCode_Optimize` (pythonGH-141378)
  pythongh-141004: Document C APIs for dictionary keys, values, and items (pythonGH-141009)
  pythongh-137959: Fix `TIER1_TO_TIER2` macro name in JIT InternalDocs (pythonGH-141496)
  pythongh-139871: Add `bytearray.take_bytes([n])` to efficiently extract `bytes` (pythonGH-140128)
  pythongh-140601: Refactor ElementTree.iterparse() tests (pythonGH-141499)
  pythongh-135801: Add the module parameter to compile() etc (pythonGH-139652)
  pythongh-140260: fix data race in `_struct` module initialization with subinterpreters (python#140909)
  pythongh-137109: refactor warning about threads when forking (python#141438)
  pythongh-141004: Document `PyRun_InteractiveOneObject` (pythonGH-141405)
  pythongh-124111: Fix TCL 9 thread detection (pythonGH-128103)
  pythongh-141442: Add escaping to iOS testbed arguments (python#141443)
  pythongh-140936: Fix JIT assertion crash at finalization if some generator is alive (pythonGH-140969)
  Add details about JIT build infrastructure and updating dependencies to `Tools/jit` (python#141167)
  pythongh-141412: Use reliable target URL for urllib example (pythonGH-141428)
  ...
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL