It’s a soft keyword, so the existing function isn’t affected. (Similar to how re.match
still works even though match
is now a soft keyword.) I talk about this here: Implementing PEP 695 | JelleZijlstra.github.io
I added a public constructor for TypeAliasType
to my implementation in gh-103763: Implement PEP 695 by JelleZijlstra · Pull Request #103764 · python/cpython · GitHub, as I think it makes sense to allow programmatic creation of these objects if people see a need for it.
Before we backport this in typing-extensions, I’d like to see a discussion on typing-sig though, because it does put a bit of a burden on type checkers to add support for this feature.
Oh! The linked page (hadn’t seen it) is an excellent explanation, thank you.
Jelle, thanks for this fantastic document! And for all your work on this project, under deadline pressure.
I won’t be able to review the code personally, but given the reviews you’ve had from Carl and others, I am confident that it will be rock solid.
We should also be grateful that Thomas moved the beta 1 date by two weeks.