mirror of
https://github.com/python/cpython.git
synced 2025-08-14 22:01:08 +00:00
[3.10] gh-94245: Fix pickling and copying of typing.Tuple[()] (GH-94260)
This commit is contained in:
parent
86e49a5026
commit
75dda3b12d
2 changed files with 3 additions and 1 deletions
|
@ -1099,7 +1099,8 @@ class _GenericAlias(_BaseGenericAlias, _root=True):
|
|||
else:
|
||||
origin = self.__origin__
|
||||
args = tuple(self.__args__)
|
||||
if len(args) == 1 and not isinstance(args[0], tuple):
|
||||
if len(args) == 1 and (not isinstance(args[0], tuple) or
|
||||
origin is Tuple and not args[0]):
|
||||
args, = args
|
||||
return operator.getitem, (origin, args)
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix pickling and copying of ``typing.Tuple[()]``.
|
Loading…
Add table
Add a link
Reference in a new issue