8000 gh-91162: Support splitting of unpacked arbitrary-length tuple over TypeVar and TypeVarTuple parameters (alt) by serhiy-storchaka · Pull Request #93412 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-91162: Support splitting of unpacked arbitrary-length tuple over TypeVar and TypeVarTuple parameters (alt) #93412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unused code.
  • Loading branch information
serhiy-storchaka committed May 29, 2022
commit 731d5fb8802b61ada11395c324bb5531803a9f1d
10 changes: 0 additions & 10 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1783,16 +1783,6 @@ def __typing_is_unpacked_typevartuple__(self):
assert len(self.__args__) == 1
return isinstance(self.__args__[0], TypeVarTuple)

@property
def __typing_is_unpacked_var_tuple__(self):
assert self.__origin__ is Unpack
assert len(self.__args__) == 1
arg, = self.__args__
if isinstance(arg, _GenericAlias):
assert arg.__origin__ is tuple
return len(arg.__args__) >= 2 and arg.__args__[-1] is ...
return False


class Generic:
"""Abstract base class for generic types.
Expand Down
0