-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-101688: Implement types.get_original_bases #101827
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Error looks unrelated? |
Yes, it is. |
Misc/NEWS.d/next/Library/2023-02-11-15-01-32.gh-issue-101688.kwXmfM.rst
Outdated
Show resolved
Hide resolved
This reverts commit dc433c4.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@gvanrossum, how's this look to you now? Any more suggestions re. the docs? |
Who is musashay? Spammer? Bot? |
No idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not excited about the use of assert. Do we do this often in other examples?
It seems to show up in a couple of other places https://github.com/search?q=repo%3Apython%2Fcpython+lang%3ARST+assert&type=code |
I feel like the closest stdlib analogues to this function are cpython/Doc/library/typing.rst Lines 2878 to 2882 in 7bf9456
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, sold.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to approve.
I'll merge once the CI finishes. |
@Gobot1234, are you up for adding a stub to typeshed and backporting it to typing_extensions? I can probably take a look soon, if you haven't got the time. |
I can probably do the typeshed stub tonight but I don't know when I'll get to the typing extensions backport |
Implements the methods described.
A couple of questions:
__orig_class__
to the slots of all the types that currently don't have them to provide better introspection support (currentlyget_orig_class(list[int]())
is None)