Skip to content

Commit 4f4a025

Browse files
msullivanJelleZijlstra
authored andcommitted
Remove tuple's __init__ method (#2467)
The __new__ method should suffice, and having both interferes with providing a __new__ in namedtuples, which we want to do to fix python/mypy#1279.
1 parent 9827132 commit 4f4a025

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

stdlib/2/__builtin__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ class slice(object):
517517

518518
class tuple(Sequence[_T_co], Generic[_T_co]):
519519
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
520-
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
521520
def __len__(self) -> int: ...
522521
def __contains__(self, x: object) -> bool: ...
523522
@overload

stdlib/2/builtins.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ class slice(object):
517517

518518
class tuple(Sequence[_T_co], Generic[_T_co]):
519519
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
520-
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
521520
def __len__(self) -> int: ...
522521
def __contains__(self, x: object) -> bool: ...
523522
@overload

stdlib/3/builtins.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ class slice:
559559

560560
class tuple(Sequence[_T_co], Generic[_T_co]):
561561
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
562-
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
563562
def __len__(self) -> int: ...
564563
def __contains__(self, x: object) -> bool: ...
565564
@overload

0 commit comments

Comments
 (0)