GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — Document PEP 698 and other new typing features in What's New by JelleZijlstra · Pull Request #104957 · python/cpython Conversation
|
|
I looked over |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| Waygood in :gh:`74690` and :gh:`103193`.) | ||
|
|
||
| * All :data:`typing.TypedDict` and :data:`typing.NamedTuple` classes now have the | ||
| ``__orig_bases__`` attribute. (Contributed by Adrian Garcia Badaracco in |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Given that this attribute is undocumented (and I'd prefer it to stay that way, though that's not a strong opinion), could we add this something like "this ensures that types.get_original_bases(typeddict_class) will now always return the correct result"?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could say "now work reliably with :func:types.get_original_bases", although that's a bit of a vacuous statement as types.get_original_bases didn't exist before 3.12 :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Eh, I guess you're right, it's probably fine as it is
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The PEP 698 section looks good to me, thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @JelleZijlstra for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-105045 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…H-104957) (cherry picked from commit 595ffdd) Co-authored-by: Jelle Zijlstra <[email protected]>
…H-104957) (#105045) Co-authored-by: Jelle Zijlstra <[email protected]>
|
|
||
| from typing import override | ||
|
|
||
| class Base: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
4 space tab would be more consistent.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.