Skip to content

Commit

Permalink
Remove tuple's __init__ method (python#2467)
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 authored and Jiri Suchan committed Jan 23, 2019
1 parent bbbdc25 commit 19c2ba5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion stdlib/2/__builtin__.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/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 19c2ba5

Please sign in to comment.