We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 043d9da commit 64554bdCopy full SHA for 64554bd
stdlib/builtins.pyi
@@ -910,7 +910,12 @@ class slice:
910
def indices(self, __len: SupportsIndex) -> tuple[int, int, int]: ...
911
912
class tuple(Sequence[_T_co], Generic[_T_co]):
913
- def __new__(cls: type[Self], __iterable: Iterable[_T_co] = ...) -> Self: ...
+ # overloads are ordered this way to pass `isinstance` checks
914
+ # see: https://github.com/python/typeshed/pull/7454#issuecomment-1061490888
915
+ @overload
916
+ def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...
917
918
+ def __new__(cls) -> tuple[()]: ...
919
def __len__(self) -> int: ...
920
def __contains__(self, __x: object) -> bool: ...
921
@overload
0 commit comments