| 1 |
# These builtins stubs are used implicitly in AST to IR generation |
| 2 |
# test cases. |
| 3 |
|
| 4 |
import _typeshed |
| 5 |
from typing import ( |
| 6 |
Self, TypeVar, Generic, List, Iterator, Iterable, Dict, Optional, Tuple, Any, Set, |
| 7 |
overload, Mapping, Union, Callable, Sequence, FrozenSet, Protocol |
| 8 |
) |
| 9 |
|
| 10 |
_T = TypeVar('_T') |
| 11 |
T_co = TypeVar('T_co', covariant=True) |
| 12 |
T_contra = TypeVar('T_contra', contravariant=True) |
| 13 |
_S = TypeVar('_S') |
| 14 |
_K = TypeVar('_K') # for keys in mapping |
| 15 |
_V = TypeVar('_V') # for values in mapping |
| 16 |
|
| 17 |
class __SupportsAbs(Protocol[T_co]): |
| 18 |
def __abs__(self) -> T_co: pass |
| 19 |
|
| 20 |
class __SupportsDivMod(Protocol[T_contra, T_co]): |
| 21 |
def __divmod__(self, other: T_contra) -> T_co: ... |
| 22 |
|
| 23 |
class __SupportsRDivMod(Protocol[T_contra, T_co]): |
| 24 |
def __rdivmod__(self, other: T_contra) -> T_co: ... |
| 25 |
|
| 26 |
_M = TypeVar("_M", contravariant=True) |
| 27 |
|
| 28 |
class __SupportsPow2(Protocol[T_contra, T_co]): |
| 29 |
def __pow__(self, other: T_contra) -> T_co: ... |
| 30 |
|
| 31 |
class __SupportsPow3NoneOnly(Protocol[T_contra, T_co]): |
| 32 |
def __pow__(self, other: T_contra, modulo: None = ...) -> T_co: ... |
| 33 |
|
| 34 |
class __SupportsPow3(Protocol[T_contra, _M, T_co]): |
| 35 |
def __pow__(self, other: T_contra, modulo: _M) -> T_co: ... |
| 36 |
|
| 37 |
__SupportsSomeKindOfPow = Union[ |
| 38 |
__SupportsPow2[Any, Any], __SupportsPow3NoneOnly[Any, Any] | __SupportsPow3[Any, Any, Any] |
| 39 |
] |
| 40 |
|
| 41 |
class object: |
| 42 |
__class__: type |
| 43 |
__dict__: dict[str, Any] |
| 44 |
def __new__(cls) -> Self: pass |
| 45 |
def __init__(self) -> None: pass |
| 46 |
def __init_subclass__(cls, **kwargs: object) -> None: pass |
| 47 |
def __eq__(self, x: object) -> bool: pass |
| 48 |
def __ne__(self, x: object) -> bool: pass |
| 49 |
def __str__(self) -> str: pass |
| 50 |
def __setattr__(self, k: str, v: object) -> None: pass |
| 51 |
def __delattr__(self, k: str) -> None: pass |
| 52 |
|
| 53 |
class type: |
| 54 |
def __init__(self, o: object) -> None: ... |
| 55 |
def __or__(self, o: object) -> Any: ... |
| 56 |
def __new__(cls, *args: object) -> Any: ... |
| 57 |
__name__ : str |
| 58 |
__annotations__: Dict[str, Any] |
| 59 |
|
| 60 |
class ellipsis: pass |
| 61 |
|
| 62 |
# Primitive types are special in generated code. |
| 63 |
|
| 64 |
class int: |
| 65 |
@overload |
| 66 |
def __init__(self) -> None: pass |
| 67 |
@overload |
| 68 |
def __init__(self, x: object, base: int = 10) -> None: pass |
| 69 |
def __add__(self, n: int) -> int: pass |
| 70 |
def __sub__(self, n: int) -> int: pass |
| 71 |
def __mul__(self, n: int) -> int: pass |
| 72 |
def __pow__(self, n: int, modulo: Optional[int] = None) -> int: pass |
| 73 |
def __floordiv__(self, x: int) -> int: pass |
| 74 |
def __truediv__(self, x: float) -> float: pass |
| 75 |
def __mod__(self, x: int) -> int: pass |
| 76 |
def __divmod__(self, x: float) -> Tuple[float, float]: pass |
| 77 |
def __neg__(self) -> int: pass |
| 78 |
def __pos__(self) -> int: pass |
| 79 |
def __abs__(self) -> int: pass |
| 80 |
def __invert__(self) -> int: pass |
| 81 |
def __and__(self, n: int) -> int: pass |
| 82 |
def __or__(self, n: int) -> int: pass |
| 83 |
def __xor__(self, n: int) -> int: pass |
| 84 |
def __lshift__(self, x: int) -> int: pass |
| 85 |
def __rshift__(self, x: int) -> int: pass |
| 86 |
def __eq__(self, n: object) -> bool: pass |
| 87 |
def __ne__(self, n: object) -> bool: pass |
| 88 |
def __lt__(self, n: int) -> bool: pass |
| 89 |
def __gt__(self, n: int) -> bool: pass |
| 90 |
def __le__(self, n: int) -> bool: pass |
| 91 |
def __ge__(self, n: int) -> bool: pass |
| 92 |
def to_bytes(self, length: int, order: str, *, signed: bool = False) -> bytes: pass |
| 93 |
def bit_length(self) -> int: pass |
| 94 |
|
| 95 |
class str: |
| 96 |
@overload |
| 97 |
def __init__(self) -> None: pass |
| 98 |
@overload |
| 99 |
def __init__(self, x: object) -> None: pass |
| 100 |
def __add__(self, x: str) -> str: pass |
| 101 |
def __mul__(self, x: int) -> str: pass |
| 102 |
def __rmul__(self, x: int) -> str: pass |
| 103 |
def __eq__(self, x: object) -> bool: pass |
| 104 |
def __ne__(self, x: object) -> bool: pass |
| 105 |
def __lt__(self, x: str) -> bool: ... |
| 106 |
def __le__(self, x: str) -> bool: ... |
| 107 |
def __gt__(self, x: str) -> bool: ... |
| 108 |
def __ge__(self, x: str) -> bool: ... |
| 109 |
@overload |
| 110 |
def __getitem__(self, i: int) -> str: pass |
| 111 |
@overload |
| 112 |
def __getitem__(self, i: slice) -> str: pass |
| 113 |
def __contains__(self, item: str) -> bool: pass |
| 114 |
def __iter__(self) -> Iterator[str]: ... |
| 115 |
def find(self, sub: str, start: Optional[int] = None, end: Optional[int] = None, /) -> int: ... |
| 116 |
def rfind(self, sub: str, start: Optional[int] = None, end: Optional[int] = None, /) -> int: ... |
| 117 |
def split(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: pass |
| 118 |
def rsplit(self, sep: Optional[str] = None, maxsplit: int = -1) -> List[str]: pass |
| 119 |
def splitlines(self, keepends: bool = False) -> List[str]: ... |
| 120 |
def strip (self, item: Optional[str] = None) -> str: pass |
| 121 |
def lstrip(self, item: Optional[str] = None) -> str: pass |
| 122 |
def rstrip(self, item: Optional[str] = None) -> str: pass |
| 123 |
def join(self, x: Iterable[str]) -> str: pass |
| 124 |
def format(self, *args: Any, **kwargs: Any) -> str: ... |
| 125 |
def lower(self) -> str: ... |
| 126 |
def upper(self) -> str: ... |
| 127 |
def startswith(self, x: Union[str, Tuple[str, ...]], start: int=..., end: int=...) -> bool: ... |
| 128 |
def endswith(self, x: Union[str, Tuple[str, ...]], start: int=..., end: int=...) -> bool: ... |
| 129 |
def replace(self, old: str, new: str, maxcount: int=...) -> str: ... |
| 130 |
def encode(self, encoding: str=..., errors: str=...) -> bytes: ... |
| 131 |
def partition(self, sep: str, /) -> Tuple[str, str, str]: ... |
| 132 |
def rpartition(self, sep: str, /) -> Tuple[str, str, str]: ... |
| 133 |
def removeprefix(self, prefix: str, /) -> str: ... |
| 134 |
def removesuffix(self, suffix: str, /) -> str: ... |
| 135 |
def islower(self) -> bool: ... |
| 136 |
def count(self, substr: str, start: Optional[int] = None, end: Optional[int] = None) -> int: pass |
| 137 |
def isspace(self) -> bool: ... |
| 138 |
def isalnum(self) -> bool: ... |
| 139 |
def isdigit(self) -> bool: ... |
| 140 |
|
| 141 |
class float: |
| 142 |
def __init__(self, x: object) -> None: pass |
| 143 |
def __add__(self, n: float) -> float: pass |
| 144 |
def __radd__(self, n: float) -> float: pass |
| 145 |
def __sub__(self, n: float) -> float: pass |
| 146 |
def __rsub__(self, n: float) -> float: pass |
| 147 |
def __mul__(self, n: float) -> float: pass |
| 148 |
def __truediv__(self, n: float) -> float: pass |
| 149 |
def __floordiv__(self, n: float) -> float: pass |
| 150 |
def __mod__(self, n: float) -> float: pass |
| 151 |
def __pow__(self, n: float) -> float: pass |
| 152 |
def __neg__(self) -> float: pass |
| 153 |
def __pos__(self) -> float: pass |
| 154 |
def __abs__(self) -> float: pass |
| 155 |
def __invert__(self) -> float: pass |
| 156 |
def __eq__(self, x: object) -> bool: pass |
| 157 |
def __ne__(self, x: object) -> bool: pass |
| 158 |
def __lt__(self, x: float) -> bool: ... |
| 159 |
def __le__(self, x: float) -> bool: ... |
| 160 |
def __gt__(self, x: float) -> bool: ... |
| 161 |
def __ge__(self, x: float) -> bool: ... |
| 162 |
|
| 163 |
class complex: |
| 164 |
def __init__(self, x: object, y: object = None) -> None: pass |
| 165 |
def __add__(self, n: complex) -> complex: pass |
| 166 |
def __radd__(self, n: float) -> complex: pass |
| 167 |
def __sub__(self, n: complex) -> complex: pass |
| 168 |
def __rsub__(self, n: float) -> complex: pass |
| 169 |
def __mul__(self, n: complex) -> complex: pass |
| 170 |
def __truediv__(self, n: complex) -> complex: pass |
| 171 |
def __neg__(self) -> complex: pass |
| 172 |
|
| 173 |
class bytes: |
| 174 |
@overload |
| 175 |
def __init__(self) -> None: ... |
| 176 |
@overload |
| 177 |
def __init__(self, x: object) -> None: ... |
| 178 |
def __add__(self, x: bytes | bytearray) -> bytes: ... |
| 179 |
def __mul__(self, x: int) -> bytes: ... |
| 180 |
def __rmul__(self, x: int) -> bytes: ... |
| 181 |
def __eq__(self, x: object) -> bool: ... |
| 182 |
def __ne__(self, x: object) -> bool: ... |
| 183 |
@overload |
| 184 |
def __getitem__(self, i: int) -> int: ... |
| 185 |
@overload |
| 186 |
def __getitem__(self, i: slice) -> bytes: ... |
| 187 |
def join(self, x: Iterable[object]) -> bytes: ... |
| 188 |
def decode(self, encoding: str=..., errors: str=...) -> str: ... |
| 189 |
def translate(self, t: bytes | bytearray) -> bytes: ... |
| 190 |
def startswith(self, t: bytes | bytearray) -> bool: ... |
| 191 |
def endswith(self, t: bytes | bytearray) -> bool: ... |
| 192 |
def __iter__(self) -> Iterator[int]: ... |
| 193 |
|
| 194 |
class bytearray: |
| 195 |
@overload |
| 196 |
def __init__(self) -> None: pass |
| 197 |
@overload |
| 198 |
def __init__(self, x: object) -> None: pass |
| 199 |
@overload |
| 200 |
def __init__(self, string: str, encoding: str, err: str = ...) -> None: pass |
| 201 |
def __add__(self, s: bytes | bytearray) -> bytearray: ... |
| 202 |
def __setitem__(self, i: int, o: int) -> None: ... |
| 203 |
@overload |
| 204 |
def __getitem__(self, i: int) -> int: ... |
| 205 |
@overload |
| 206 |
def __getitem__(self, i: slice) -> bytearray: ... |
| 207 |
def decode(self, x: str = ..., y: str = ...) -> str: ... |
| 208 |
def join(self, x: Iterable[object]) -> bytes: ... |
| 209 |
def startswith(self, t: bytes) -> bool: ... |
| 210 |
def endswith(self, t: bytes) -> bool: ... |
| 211 |
def __iter__(self) -> Iterator[int]: ... |
| 212 |
|
| 213 |
class bool(int): |
| 214 |
def __init__(self, o: object = ...) -> None: ... |
| 215 |
@overload |
| 216 |
def __and__(self, n: bool) -> bool: ... |
| 217 |
@overload |
| 218 |
def __and__(self, n: int) -> int: ... |
| 219 |
@overload |
| 220 |
def __or__(self, n: bool) -> bool: ... |
| 221 |
@overload |
| 222 |
def __or__(self, n: int) -> int: ... |
| 223 |
@overload |
| 224 |
def __xor__(self, n: bool) -> bool: ... |
| 225 |
@overload |
| 226 |
def __xor__(self, n: int) -> int: ... |
| 227 |
|
| 228 |
class tuple(Generic[T_co], Sequence[T_co], Iterable[T_co]): |
| 229 |
def __init__(self, i: Iterable[T_co]) -> None: pass |
| 230 |
@overload |
| 231 |
def __getitem__(self, i: int) -> T_co: pass |
| 232 |
@overload |
| 233 |
def __getitem__(self, i: slice) -> Tuple[T_co, ...]: pass |
| 234 |
def __len__(self) -> int: pass |
| 235 |
def __iter__(self) -> Iterator[T_co]: ... |
| 236 |
def __contains__(self, item: object) -> int: ... |
| 237 |
@overload |
| 238 |
def __add__(self, value: Tuple[T_co, ...], /) -> Tuple[T_co, ...]: ... |
| 239 |
@overload |
| 240 |
def __add__(self, value: Tuple[_T, ...], /) -> Tuple[T_co | _T, ...]: ... |
| 241 |
def __mul__(self, value: int, /) -> Tuple[T_co, ...]: ... |
| 242 |
def __rmul__(self, value: int, /) -> Tuple[T_co, ...]: ... |
| 243 |
|
| 244 |
class function: pass |
| 245 |
|
| 246 |
class list(Generic[_T], Sequence[_T], Iterable[_T]): |
| 247 |
def __init__(self, i: Optional[Iterable[_T]] = None) -> None: pass |
| 248 |
@overload |
| 249 |
def __getitem__(self, i: int) -> _T: ... |
| 250 |
@overload |
| 251 |
def __getitem__(self, s: slice) -> List[_T]: ... |
| 252 |
def __setitem__(self, i: int, o: _T) -> None: pass |
| 253 |
def __delitem__(self, i: int) -> None: pass |
| 254 |
def __mul__(self, i: int) -> List[_T]: pass |
| 255 |
def __rmul__(self, i: int) -> List[_T]: pass |
| 256 |
def __imul__(self, i: int) -> List[_T]: ... |
| 257 |
def __iter__(self) -> Iterator[_T]: pass |
| 258 |
def __len__(self) -> int: pass |
| 259 |
def __contains__(self, item: object) -> int: ... |
| 260 |
@overload |
| 261 |
def __add__(self, value: List[_T], /) -> List[_T]: ... |
| 262 |
@overload |
| 263 |
def __add__(self, value: List[_S], /) -> List[_S | _T]: ... |
| 264 |
def __iadd__(self, value: Iterable[_T], /) -> List[_T]: ... # type: ignore[misc] |
| 265 |
def append(self, x: _T) -> None: pass |
| 266 |
def pop(self, i: int = -1) -> _T: pass |
| 267 |
def count(self, x: _T) -> int: pass |
| 268 |
def extend(self, l: Iterable[_T]) -> None: pass |
| 269 |
def insert(self, i: int, x: _T) -> None: pass |
| 270 |
def sort(self) -> None: pass |
| 271 |
def reverse(self) -> None: pass |
| 272 |
def remove(self, o: _T) -> None: pass |
| 273 |
def index(self, o: _T) -> int: pass |
| 274 |
def clear(self) -> None: pass |
| 275 |
def copy(self) -> List[_T]: pass |
| 276 |
|
| 277 |
class dict(Mapping[_K, _V]): |
| 278 |
@overload |
| 279 |
def __init__(self, **kwargs: _K) -> None: ... |
| 280 |
@overload |
| 281 |
def __init__(self, map: Mapping[_K, _V], **kwargs: _V) -> None: ... |
| 282 |
@overload |
| 283 |
def __init__(self, iterable: Iterable[Tuple[_K, _V]], **kwargs: _V) -> None: ... |
| 284 |
def __getitem__(self, key: _K) -> _V: pass |
| 285 |
def __setitem__(self, k: _K, v: _V) -> None: pass |
| 286 |
def __delitem__(self, k: _K) -> None: pass |
| 287 |
def __contains__(self, item: object) -> int: pass |
| 288 |
def __iter__(self) -> Iterator[_K]: pass |
| 289 |
def __len__(self) -> int: pass |
| 290 |
@overload |
| 291 |
def update(self, __m: Mapping[_K, _V], **kwargs: _V) -> None: pass |
| 292 |
@overload |
| 293 |
def update(self, __m: Iterable[Tuple[_K, _V]], **kwargs: _V) -> None: ... |
| 294 |
@overload |
| 295 |
def update(self, **kwargs: _V) -> None: ... |
| 296 |
def pop(self, x: int) -> _K: pass |
| 297 |
def keys(self) -> Iterable[_K]: pass |
| 298 |
def values(self) -> Iterable[_V]: pass |
| 299 |
def items(self) -> Iterable[Tuple[_K, _V]]: pass |
| 300 |
def clear(self) -> None: pass |
| 301 |
def copy(self) -> Dict[_K, _V]: pass |
| 302 |
def setdefault(self, key: _K, val: _V = ...) -> _V: pass |
| 303 |
|
| 304 |
class set(Generic[_T]): |
| 305 |
def __init__(self, i: Optional[Iterable[_T]] = None) -> None: pass |
| 306 |
def __iter__(self) -> Iterator[_T]: pass |
| 307 |
def __len__(self) -> int: pass |
| 308 |
def add(self, x: _T) -> None: pass |
| 309 |
def remove(self, x: _T) -> None: pass |
| 310 |
def discard(self, x: _T) -> None: pass |
| 311 |
def clear(self) -> None: pass |
| 312 |
def pop(self) -> _T: pass |
| 313 |
def update(self, x: Iterable[_S]) -> None: pass |
| 314 |
def __or__(self, s: Union[Set[_S], FrozenSet[_S]]) -> Set[Union[_T, _S]]: ... |
| 315 |
def __xor__(self, s: Union[Set[_S], FrozenSet[_S]]) -> Set[Union[_T, _S]]: ... |
| 316 |
|
| 317 |
class frozenset(Generic[_T]): |
| 318 |
def __init__(self, i: Optional[Iterable[_T]] = None) -> None: pass |
| 319 |
def __iter__(self) -> Iterator[_T]: pass |
| 320 |
def __len__(self) -> int: pass |
| 321 |
def __or__(self, s: Union[Set[_S], FrozenSet[_S]]) -> FrozenSet[Union[_T, _S]]: ... |
| 322 |
def __xor__(self, s: Union[Set[_S], FrozenSet[_S]]) -> FrozenSet[Union[_T, _S]]: ... |
| 323 |
|
| 324 |
class slice: pass |
| 325 |
|
| 326 |
class range(Iterable[int]): |
| 327 |
def __init__(self, x: int, y: int = ..., z: int = ...) -> None: pass |
| 328 |
def __iter__(self) -> Iterator[int]: pass |
| 329 |
def __len__(self) -> int: pass |
| 330 |
def __next__(self) -> int: pass |
| 331 |
|
| 332 |
class map(Iterator[_S]): |
| 333 |
def __init__(self, func: Callable[[_T], _S], iterable: Iterable[_T]) -> None: pass |
| 334 |
def __iter__(self) -> Self: pass |
| 335 |
def __next__(self) -> _S: pass |
| 336 |
|
| 337 |
class property: |
| 338 |
def __init__(self, fget: Optional[Callable[[Any], Any]] = ..., |
| 339 |
fset: Optional[Callable[[Any, Any], None]] = ..., |
| 340 |
fdel: Optional[Callable[[Any], None]] = ..., |
| 341 |
doc: Optional[str] = ...) -> None: ... |
| 342 |
def getter(self, fget: Callable[[Any], Any]) -> property: ... |
| 343 |
def setter(self, fset: Callable[[Any, Any], None]) -> property: ... |
| 344 |
def deleter(self, fdel: Callable[[Any], None]) -> property: ... |
| 345 |
def __get__(self, obj: Any, type: Optional[type] = ...) -> Any: ... |
| 346 |
def __set__(self, obj: Any, value: Any) -> None: ... |
| 347 |
def __delete__(self, obj: Any) -> None: ... |
| 348 |
def fget(self) -> Any: ... |
| 349 |
def fset(self, value: Any) -> None: ... |
| 350 |
def fdel(self) -> None: ... |
| 351 |
|
| 352 |
class BaseException: pass |
| 353 |
|
| 354 |
class Exception(BaseException): |
| 355 |
def __init__(self, message: Optional[str] = None) -> None: pass |
| 356 |
|
| 357 |
class Warning(Exception): pass |
| 358 |
class UserWarning(Warning): pass |
| 359 |
class TypeError(Exception): pass |
| 360 |
class ValueError(Exception): pass |
| 361 |
class AttributeError(Exception): pass |
| 362 |
class ImportError(Exception): pass |
| 363 |
class NameError(Exception): pass |
| 364 |
class UnboundLocalError(NameError): pass |
| 365 |
class LookupError(Exception): pass |
| 366 |
class KeyError(LookupError): pass |
| 367 |
class IndexError(LookupError): pass |
| 368 |
class RuntimeError(Exception): pass |
| 369 |
class UnicodeEncodeError(RuntimeError): pass |
| 370 |
class UnicodeDecodeError(RuntimeError): pass |
| 371 |
class NotImplementedError(RuntimeError): pass |
| 372 |
class ReferenceError(Exception): pass |
| 373 |
|
| 374 |
class StopIteration(Exception): |
| 375 |
value: Any |
| 376 |
|
| 377 |
class StopAsyncIteration(Exception): |
| 378 |
value: Any |
| 379 |
|
| 380 |
class ArithmeticError(Exception): pass |
| 381 |
class ZeroDivisionError(ArithmeticError): pass |
| 382 |
class OverflowError(ArithmeticError): pass |
| 383 |
|
| 384 |
class GeneratorExit(BaseException): pass |
| 385 |
|
| 386 |
def any(i: Iterable[_T]) -> bool: pass |
| 387 |
def all(i: Iterable[_T]) -> bool: pass |
| 388 |
@overload |
| 389 |
def sum(i: Iterable[bool]) -> int: pass |
| 390 |
@overload |
| 391 |
def sum(i: Iterable[_T]) -> _T: pass |
| 392 |
@overload |
| 393 |
def sum(i: Iterable[_T], start: _T) -> _T: pass |
| 394 |
def reversed(object: Sequence[_T]) -> Iterator[_T]: ... |
| 395 |
def id(o: object) -> int: pass |
| 396 |
# This type is obviously wrong but the test stubs don't have Sized anymore |
| 397 |
def len(o: object) -> int: pass |
| 398 |
def print(*args: object) -> None: pass |
| 399 |
def isinstance(x: object, t: object) -> bool: pass |
| 400 |
def iter(i: Iterable[_T]) -> Iterator[_T]: pass |
| 401 |
@overload |
| 402 |
def next(i: Iterator[_T]) -> _T: pass |
| 403 |
@overload |
| 404 |
def next(i: Iterator[_T], default: _T) -> _T: pass |
| 405 |
def hash(o: object) -> int: ... |
| 406 |
def globals() -> Dict[str, Any]: ... |
| 407 |
def hasattr(obj: object, name: str) -> bool: ... |
| 408 |
def getattr(obj: object, name: str, default: Any = None) -> Any: ... |
| 409 |
def setattr(obj: object, name: str, value: Any) -> None: ... |
| 410 |
def delattr(obj: object, name: str) -> None: ... |
| 411 |
def enumerate(x: Iterable[_T]) -> Iterator[Tuple[int, _T]]: ... |
| 412 |
@overload |
| 413 |
def zip(x: Iterable[_T], y: Iterable[_S]) -> Iterator[Tuple[_T, _S]]: ... |
| 414 |
@overload |
| 415 |
def zip(x: Iterable[_T], y: Iterable[_S], z: Iterable[_V]) -> Iterator[Tuple[_T, _S, _V]]: ... |
| 416 |
def eval(e: str) -> Any: ... |
| 417 |
def abs(x: __SupportsAbs[_T]) -> _T: ... |
| 418 |
@overload |
| 419 |
def divmod(x: __SupportsDivMod[T_contra, T_co], y: T_contra) -> T_co: ... |
| 420 |
@overload |
| 421 |
def divmod(x: T_contra, y: __SupportsRDivMod[T_contra, T_co]) -> T_co: ... |
| 422 |
@overload |
| 423 |
def pow(base: __SupportsPow2[T_contra, T_co], exp: T_contra, mod: None = None) -> T_co: ... |
| 424 |
@overload |
| 425 |
def pow(base: __SupportsPow3NoneOnly[T_contra, T_co], exp: T_contra, mod: None = None) -> T_co: ... |
| 426 |
@overload |
| 427 |
def pow(base: __SupportsPow3[T_contra, _M, T_co], exp: T_contra, mod: _M) -> T_co: ... |
| 428 |
def sorted(iterable: Iterable[_T]) -> list[_T]: ... |
| 429 |
def exit() -> None: ... |
| 430 |
def min(x: _T, y: _T) -> _T: ... |
| 431 |
def max(x: _T, y: _T) -> _T: ... |
| 432 |
def repr(o: object) -> str: ... |
| 433 |
def ascii(o: object) -> str: ... |
| 434 |
def ord(o: object) -> int: ... |
| 435 |
def chr(i: int) -> str: ... |
| 436 |
|
| 437 |
# Dummy definitions. |
| 438 |
class classmethod: pass |
| 439 |
class staticmethod: pass |
| 440 |
|
| 441 |
NotImplemented: Any = ... |