mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-44732: Rename types.Union to types.UnionType (GH-27342)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 2b8ad9e6c5)
Co-authored-by: Hasan <hasan.aleeyev@gmail.com>
This commit is contained in:
parent
16a174f7ba
commit
8a37e8cf45
7 changed files with 22 additions and 22 deletions
|
|
@ -3084,7 +3084,7 @@ class C(Generic[T]): pass
|
|||
self.assertIs(get_origin(Callable), collections.abc.Callable)
|
||||
self.assertIs(get_origin(list[int]), list)
|
||||
self.assertIs(get_origin(list), None)
|
||||
self.assertIs(get_origin(list | str), types.Union)
|
||||
self.assertIs(get_origin(list | str), types.UnionType)
|
||||
self.assertIs(get_origin(P.args), P)
|
||||
self.assertIs(get_origin(P.kwargs), P)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue