Files
typeshed/stdlib/_random.pyi
T
Stephen Morton cc14cc6c2a fix up some C signatures (#14624)
a few issues exposed after https://github.com/python/mypy/pull/18259 was merged
2025-08-22 06:58:55 -07:00

18 lines
541 B
Python

import sys
from typing_extensions import Self, TypeAlias
# Actually Tuple[(int,) * 625]
_State: TypeAlias = tuple[int, ...]
class Random:
if sys.version_info >= (3, 10):
def __init__(self, seed: object = ..., /) -> None: ...
else:
def __new__(self, seed: object = ..., /) -> Self: ...
def seed(self, n: object = None, /) -> None: ...
def getstate(self) -> _State: ...
def setstate(self, state: _State, /) -> None: ...
def random(self) -> float: ...
def getrandbits(self, k: int, /) -> int: ...