Skip to content
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

PEP 695: Fix runtime behavior example of generic classes #4172

Closed
wants to merge 1 commit into from

Conversation

Viicos
Copy link
Contributor

@Viicos Viicos commented Dec 15, 2024

At runtime, Generic is added as a base class:

class A[T](Base):
    pass

A.__bases__
#> (<class '__main__.Base'>, <class 'typing.Generic'>)

Note: I know the PEP is a historical document and this one is marked as final. However, this seems to be the only place where the runtime behavior is documented.

  • Change is either:
    • To a Draft PEP
    • To an Accepted or Final PEP, with Steering Council approval
    • To fix an editorial issue (markup, typo, link, header, etc)
  • PR title prefixed with PEP number (e.g. PEP 123: Summary of changes)

📚 Documentation preview 📚: https://pep-previews--4172.org.readthedocs.build/

@Viicos Viicos requested a review from gvanrossum as a code owner December 15, 2024 17:02
@Viicos
Copy link
Contributor Author

Viicos commented Dec 15, 2024

My bad, seems like this is documented here. Feel free to close if necessary.

@gvanrossum gvanrossum closed this Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants