Skip to content

Commit d42c0fc

Browse files
Revert "add overload to tuple.__new__ to better express an empty tuple (#7454)"
This reverts commit 64554bd.
1 parent 27db372 commit d42c0fc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

stdlib/builtins.pyi

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -904,12 +904,7 @@ class slice:
904904
def indices(self, __len: SupportsIndex) -> tuple[int, int, int]: ...
905905

906906
class tuple(Sequence[_T_co], Generic[_T_co]):
907-
# overloads are ordered this way to pass `isinstance` checks
908-
# see: https://github.com/python/typeshed/pull/7454#issuecomment-1061490888
909-
@overload
910-
def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...
911-
@overload
912-
def __new__(cls) -> tuple[()]: ...
907+
def __new__(cls: type[Self], __iterable: Iterable[_T_co] = ...) -> Self: ...
913908
def __len__(self) -> int: ...
914909
def __contains__(self, __x: object) -> bool: ...
915910
@overload

0 commit comments

Comments
 (0)