From 00039ee35467e8c656bf55fa5d0336e74a876200 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sun, 2 May 2021 12:32:29 -0700 Subject: [PATCH] array: update for py310 (#5294) Co-authored-by: hauntsaninja <> --- stdlib/array.pyi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stdlib/array.pyi b/stdlib/array.pyi index c7e1ef0bb..498bf9291 100644 --- a/stdlib/array.pyi +++ b/stdlib/array.pyi @@ -33,7 +33,10 @@ class array(MutableSequence[_T], Generic[_T]): def fromfile(self, __f: BinaryIO, __n: int) -> None: ... def fromlist(self, __list: List[_T]) -> None: ... def fromunicode(self, __ustr: str) -> None: ... - def index(self, __v: _T) -> int: ... # type: ignore # Overrides Sequence + if sys.version_info >= (3, 10): + def index(self, __v: _T, __start: int = ..., __stop: int = ...) -> int: ... + else: + def index(self, __v: _T) -> int: ... # type: ignore # Overrides Sequence def insert(self, __i: int, __v: _T) -> None: ... def pop(self, __i: int = ...) -> _T: ... if sys.version_info < (3,):