mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
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:
committed by
Jelle Zijlstra
parent
9827132d5b
commit
4f4a025409
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user