Skip to content

Conversation

@sandole
Copy link

@sandole sandole commented Dec 29, 2025

The Context.items(), Context.keys(), and Context.values() methods return iterators, not lists. Updated the docstrings in both the C source and the documentation to accurately reflect this behavior.

Files modified:

  • Python/context.c: Updated clinic input docstrings
  • Python/clinic/context.c.h: Regenerated by clinic tool
  • Doc/library/contextvars.rst: Updated documentation

📚 Documentation preview 📚: https://cpython-previews--143266.org.readthedocs.build/

The Context.items(), Context.keys(), and Context.values() methods
return iterators, not lists. Updated the docstrings in both the
C source and the documentation to accurately reflect this behavior.

Files modified:
- Python/context.c: Updated clinic input docstrings
- Python/clinic/context.c.h: Regenerated by clinic tool
- Doc/library/contextvars.rst: Updated documentation
@sandole sandole requested a review from 1st1 as a code owner December 29, 2025 01:28
@bedevere-app
Copy link

bedevere-app bot commented Dec 29, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@aisk
Copy link
Contributor

aisk commented Dec 29, 2025

Hi, there is already an open PR for the original issue (with almost the same changes): #142919 . Please check whether there is already work in progress on an issue before starting to work on it, to reduce unnecessary duplication of effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants