Revert "fix list concatenation (#2404)" (#2653)

The fix caused regressions for mypy that are difficult to
fix.  See https://github.com/python/mypy/issues/5492 for
context.

This reverts commit 1a42a2c3ea.
This commit is contained in:
Jukka Lehtosalo
2018-11-29 20:20:29 +00:00
committed by Jelle Zijlstra
parent ece96777a7
commit 84548f5bba
3 changed files with 9 additions and 9 deletions

View File

@@ -595,7 +595,7 @@ class tuple(Sequence[_T_co], Generic[_T_co]):
def __le__(self, x: Tuple[_T_co, ...]) -> bool: ...
def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ...
def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ...
def __add__(self, x: Tuple[_S, ...]) -> Tuple[Union[_T_co, _S], ...]: ...
def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ...
def __mul__(self, n: int) -> Tuple[_T_co, ...]: ...
def __rmul__(self, n: int) -> Tuple[_T_co, ...]: ...
def count(self, x: Any) -> int: ...
@@ -642,8 +642,8 @@ class list(MutableSequence[_T], Generic[_T]):
@overload
def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ...
def __delitem__(self, i: Union[int, slice]) -> None: ...
def __add__(self, x: List[_S]) -> List[Union[_T, _S]]: ...
def __iadd__(self, x: Iterable[_T]) -> List[_T]: ... # type: ignore
def __add__(self, x: List[_T]) -> List[_T]: ...
def __iadd__(self, x: Iterable[_T]) -> List[_T]: ...
def __mul__(self, n: int) -> List[_T]: ...
def __rmul__(self, n: int) -> List[_T]: ...
def __imul__(self, n: int) -> List[_T]: ...