massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2and3 / array.pyi
1 # Stubs for array\r
2 \r
3 # Based on http://docs.python.org/3.6/library/array.html\r
4 \r
5 import sys\r
6 from typing import (Any, BinaryIO, Generic, Iterable, Iterator, List, MutableSequence,\r
7                     overload, Text, Tuple, TypeVar, Union)\r
8 \r
9 _T = TypeVar('_T', int, float, Text)\r
10 \r
11 if sys.version_info >= (3,):\r
12     typecodes = ...  # type: str\r
13 \r
14 class array(MutableSequence[_T], Generic[_T]):\r
15     typecode = ...  # type: str\r
16     itemsize = ...  # type: int\r
17     def __init__(self, typecode: str,\r
18                  __initializer: Union[bytes, Iterable[_T]] = ...) -> None: ...\r
19     def append(self, x: _T) -> None: ...\r
20     def buffer_info(self) -> Tuple[int, int]: ...\r
21     def byteswap(self) -> None: ...\r
22     def count(self, x: Any) -> int: ...\r
23     def extend(self, iterable: Iterable[_T]) -> None: ...\r
24     if sys.version_info >= (3, 2):\r
25         def frombytes(self, s: bytes) -> None: ...\r
26     def fromfile(self, f: BinaryIO, n: int) -> None: ...\r
27     def fromlist(self, list: List[_T]) -> None: ...\r
28     def fromstring(self, s: bytes) -> None: ...\r
29     def fromunicode(self, s: str) -> None: ...\r
30     def index(self, x: _T) -> int: ...  # type: ignore  # Overrides Sequence\r
31     def insert(self, i: int, x: _T) -> None: ...\r
32     def pop(self, i: int = ...) -> _T: ...\r
33     if sys.version_info < (3,):\r
34         def read(self, f: BinaryIO, n: int) -> None: ...\r
35     def remove(self, x: Any) -> None: ...\r
36     def reverse(self) -> None: ...\r
37     if sys.version_info >= (3, 2):\r
38         def tobytes(self) -> bytes: ...\r
39     def tofile(self, f: BinaryIO) -> None: ...\r
40     def tolist(self) -> List[_T]: ...\r
41     def tostring(self) -> bytes: ...\r
42     def tounicode(self) -> str: ...\r
43     if sys.version_info < (3,):\r
44         def write(self, f: BinaryIO) -> None: ...\r
45 \r
46     def __len__(self) -> int: ...\r
47 \r
48     @overload\r
49     def __getitem__(self, i: int) -> _T: ...\r
50     @overload\r
51     def __getitem__(self, s: slice) -> array[_T]: ...\r
52 \r
53     @overload  # type: ignore  # Overrides MutableSequence\r
54     def __setitem__(self, i: int, o: _T) -> None: ...\r
55     @overload\r
56     def __setitem__(self, s: slice, o: array[_T]) -> None: ...\r
57 \r
58     def __delitem__(self, i: Union[int, slice]) -> None: ...\r
59     def __add__(self, x: array[_T]) -> array[_T]: ...\r
60     def __ge__(self, other: array[_T]) -> bool: ...\r
61     def __gt__(self, other: array[_T]) -> bool: ...\r
62     def __iadd__(self, x: array[_T]) -> array[_T]: ...  # type: ignore  # Overrides MutableSequence\r
63     def __imul__(self, n: int) -> array[_T]: ...\r
64     def __le__(self, other: array[_T]) -> bool: ...\r
65     def __lt__(self, other: array[_T]) -> bool: ...\r
66     def __mul__(self, n: int) -> array[_T]: ...\r
67     def __rmul__(self, n: int) -> array[_T]: ...\r
68     if sys.version_info < (3,):\r
69         def __delslice__(self, i: int, j: int) -> None: ...\r
70         def __getslice__(self, i: int, j: int) -> array[_T]: ...\r
71         def __setslice__(self, i: int, j: int, y: array[_T]) -> None: ...\r
72 \r
73 ArrayType = array\r