]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40397: Refactor typing._GenericAlias (GH-19719)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 7 May 2020 01:09:33 +0000 (04:09 +0300)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 01:09:33 +0000 (04:09 +0300)
commitc1c7d8ead9eb214a6149a43e31a3213c52448877
tree87c656b19a20d5c5ade41f8b2088d0b84a9fccec
parent470aac4d8e76556bd8f820f3f3928dca2b4d2849
bpo-40397: Refactor typing._GenericAlias (GH-19719)

Make the design more object-oriented.
Split _GenericAlias on two almost independent classes: for special
generic aliases like List and for parametrized generic aliases like List[int].
Add specialized subclasses for Callable, Callable[...], Tuple and Union[...].
Lib/typing.py