A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/python/cpython/issues/103699 below:

Add `__orig_bases__` to non-generic TypedDict · Issue #103699 · python/cpython · GitHub

Feature or enhancement

As discussed at the typing summit, non generic TypedDict's completely loose all inheritance information. Funny enough, generic TypedDict's actually preserve it via __orig_bases__ because Generic does that. So this just brings non-generic TypedDicts to be the same.

Pitch

This is very useful for runtime type checkers, and as per above the attribute already exists for generic TypedDicts

Previous discussion

Discussed at PyCon 2023 typing summit, this was an uncontroversial yes at the time.

Linked PRs

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4