Skip to content

Commit

Permalink
Remove tuple's __init__ method
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
msullivan committed Sep 19, 2018
1 parent c6c8d7e commit 722b23d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion stdlib/2/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ class slice(object):

class tuple(Sequence[_T_co], Generic[_T_co]):
def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...
def __init__(self, iterable: Iterable[_T_co] = ...) -> None: ...
def __len__(self) -> int: ...
def __contains__(self, x: object) -> bool: ...
@overload
Expand Down
1 change: 0 additions & 1 deletion stdlib/3/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ class slice:

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

0 comments on commit 722b23d

Please sign in to comment.