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

Docs: improve covariance generic typing examples #130302

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

dantetemplar
Copy link

@dantetemplar dantetemplar commented Feb 19, 2025

Copy link

cpython-cla-bot bot commented Feb 19, 2025

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app bedevere-app bot added docs Documentation in the Doc dir skip news awaiting review labels Feb 19, 2025
@dantetemplar
Copy link
Author

skip issue

@dantetemplar
Copy link
Author

dantetemplar commented Feb 19, 2025

The original documentation did not include a declaration for BasicUser, so I added one along with some additional examples

@JelleZijlstra
Copy link
Member

I don't think we need this many additional examples. Let's try to keep the examples short and focused. It may be enough to just add a class BasicUser(User): ....

@dantetemplar
Copy link
Author

I don't think we need this many additional examples. Let's try to keep the examples short and focused. It may be enough to just add a class BasicUser(User): ....

image

Let me argue, then this section does not give the reader information about how typing with inheritance will work in this case. If it’s ok, then fine, I’ll remove the unnecessary stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants