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

Runtime changes for PEP 718 -- generic function subscription by gvanrossum · Pull Request #156201 · python/cpython · GitHub

Repository navigation

Runtime changes for PEP 718 -- generic function subscription - #156201

Draft
gvanrossum wants to merge 1 commit into
python:mainfrom
gvanrossum:pep718
Draft

gvanrossum wants to merge 1 commit into
python:mainfrom
gvanrossum:pep718

Conversation

gvanrossum commented Aug 21, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

This is a vibe-coded port to main (3.16) of @Gobot1234's original 3.13 patch. I haven't reviewed it closely, but it seems to work. One of us will do the work when the PEP is accepted.

Note that at runtime, function subscription acts more like generic builtins (e.g. list[str]) than like classes. Type checkers will be the ultimate arbiter.

Triagers: if this needs an issue, let me know and I'll gladly add it.

Comment on lines -52 to +55
from types import GenericAlias, MappingProxyType, AsyncGeneratorType, CoroutineType, GeneratorType
from types import (
AsyncGeneratorType, CoroutineType, GeneratorType, GenericAlias,
MappingProxyType,
)

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

This seems redundant (it's just reformatting an import without adding or removing anything).

gvanrossum changed the title Runtime changes for PEP 718 9 Runtime changes for PEP 718 -- generic function subscription Aug 21, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL