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
https://github.com/python/mypy/issues/1279.
This commit is contained in:
Michael J. Sullivan
2018-09-18 20:01:14 -07:00
committed by Jelle Zijlstra
parent 9827132d5b
commit 4f4a025409
3 changed files with 0 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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