猫史档案馆


什么遗留代码?

用户:BYS海阔凭鱼跃天高任鸟飞BYS海阔凭鱼跃天高任鸟飞查看:9 回复:4 评论:9 创建时间:2021-07-18T16:16:02


今天,我在写python,突然手残按了个F12,编辑器突然给我来了一千多行的python代码,我自己都傻眼了!

有没有各位大神能看出这是啥

# True and False are deliberately omitted because they are keywords in
# Python 3, and stub files conform to Python 3 syntax.

from typing import (
    TypeVar, Iterator, Iterable, NoReturn, overload, Container,
    Sequence, MutableSequence, Mapping, MutableMapping, Tuple, List, Any, Dict, Callable, Generic,
    Set, AbstractSet, FrozenSet, MutableSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs,
    SupportsComplex, IO, BinaryIO, Union,
    ItemsView, KeysView, ValuesView, ByteString, Optional, AnyStr, Type, Text,
    Protocol,
)
from abc import abstractmethod, ABCMeta
from ast import mod, AST
from types import TracebackType, CodeType
import sys

if sys.version_info >= (3,):
    from typing import SupportsBytes, SupportsRound

if sys.version_info >= (3, 8):
    from typing import Literal
else:
    from typing_extensions import Literal

_T = TypeVar('_T')
_T_co = TypeVar('_T_co', covariant=True)
_KT = TypeVar('_KT')
_VT = TypeVar('_VT')
_S = TypeVar('_S')
_T1 = TypeVar('_T1')
_T2 = TypeVar('_T2')
_T3 = TypeVar('_T3')
_T4 = TypeVar('_T4')
_T5 = TypeVar('_T5')
_TT = TypeVar('_TT', bound='type')

class _SupportsIndex(Protocol):
    def __index__(self) -> int: ...

class object:
    __doc__: Optional[str]
    __dict__: Dict[str, Any]
    __slots__: Union[Text, Iterable[Text]]
    __module__: str
    if sys.version_info >= (3, 6):
        __annotations__: Dict[str, Any]

    @property
    def __class__(self: _T) -> Type[_T]: ...
    @__class__.setter
    def __class__(self, __type: Type[object]) -> None: ...
    def __init__(self) -> None: ...
    def __new__(cls) -> Any: ...
    def __setattr__(self, name: str, value: Any) -> None: ...
    def __eq__(self, o: object) -> bool: ...
    def __ne__(self, o: object) -> bool: ...
    def __str__(self) -> str: ...
    def __repr__(self) -> str: ...
    def __hash__(self) -> int: ...
    def __format__(self, format_spec: str) -> str: ...
    def __getattribute__(self, name: str) -> Any: ...
    def __delattr__(self, name: str) -> None: ...
    def __sizeof__(self) -> int: ...
    def __reduce__(self) -> Union[str, Tuple[Any, ...]]: ...
    def __reduce_ex__(self, protocol: int) -> Union[str, Tuple[Any, ...]]: ...
    if sys.version_info >= (3,):
        def __dir__(self) -> Iterable[str]: ...
    if sys.version_info >= (3, 6):
        def __init_subclass__(cls) -> None: ...

class staticmethod(object):  # Special, only valid as a decorator.
    __func__: Callable[..., Any]
    if sys.version_info >= (3,):
        __isabstractmethod__: bool

    def __init__(self, f: Callable[..., Any]) -> None: ...
    def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
    def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable[..., Any]: ...

class clas喵ethod(object):  # Special, only valid as a decorator.
    __func__: Callable[..., Any]
    if sys.version_info >= (3,):
        __isabstractmethod__: bool

    def __init__(self, f: Callable[..., Any]) -> None: ...
    def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
    def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable[..., Any]: ...

class type(object):
    __base__: type
    __bases__: Tuple[type, ...]
    __basicsize__: int
    __dict__: Dict[str, Any]
    __dictoffset__: int
    __flags__: int
    __itemsize__: int
    __module__: str
    __mro__: Tuple[type, ...]
    __name__: str
    if sys.version_info >= (3,):
        __qualname__: str
        __text_signature__: Optional[str]
    __weakrefoffset__: int

    @overload
    def __init__(self, o: object) -> None: ...
    @overload
    def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ...
    @overload
    def __new__(cls, o: object) -> type: ...
    @overload
    def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
    def __call__(self, *args: Any, **kwds: Any) -> Any: ...
    def __subclasses__(self: _TT) -> List[_TT]: ...
    # Note: the documentation doesnt specify what the return type is, the standard
    # implementation seems to be returning a list.
    def mro(self) -> List[type]: ...
    def __instancecheck__(self, instance: Any) -> bool: ...
    def __subclasscheck__(self, subclass: type) -> bool: ...
    if sys.version_info >= (3,):
        @clas喵ethod
        def __prepare__(metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any) -> Mapping[str, Any]: ...

class super(object):
    if sys.version_info >= (3,):
        @overload
        def __init__(self, t: Any, obj: Any) -> None: ...
        @overload
        def __init__(self, t: Any) -> None: ...
        @overload
        def __init__(self) -> None: ...
    else:
        @overload
        def __init__(self, t: Any, obj: Any) -> None: ...
        @overload
        def __init__(self, t: Any) -> None: ...

class int:
    @overload
    def __init__(self, x: Union[Text, bytes, SupportsInt, _SupportsIndex] = ...) -> None: ...
    @overload
    def __init__(self, x: Union[Text, bytes, bytearray], base: int) -> None: ...

    if sys.version_info >= (3, 8):
        def as_integer_ratio(self) -> Tuple[int, Literal[1]]: ...
    @property
    def real(self) -> int: ...
    @property
    def imag(self) -> int: ...
    @property
    def numerator(self) -> int: ...
    @property
    def denominator(self) -> int: ...
    def conjugate(self) -> int: ...

    def bit_length(self) -> int: ...
    if sys.version_info >= (3,):
        def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ...
        @clas喵ethod
        def from_bytes(cls, bytes: Sequence[int], byteorder: str, *,
                       signed: bool = ...) -> int: ...  # TODO buffer object argument

    def __add__(self, x: int) -> int: ...
    def __sub__(self, x: int) -> int: ...
    def __mul__(self, x: int) -> int: ...
    def __floordiv__(self, x: int) -> int: ...
    if sys.version_info < (3,):
        def __div__(self, x: int) -> int: ...
    def __truediv__(self, x: int) -> float: ...
    def __mod__(self, x: int) -> int: ...
    def __divmod__(self, x: int) -> Tuple[int, int]: ...
    def __radd__(self, x: int) -> int: ...
    def __rsub__(self, x: int) -> int: ...
    def __rmul__(self, x: int) -> int: ...
    def __rfloordiv__(self, x: int) -> int: ...
    if sys.version_info < (3,):
        def __rdiv__(self, x: int) -> int: ...
    def __rtruediv__(self, x: int) -> float: ...
    def __rmod__(self, x: int) -> int: ...
    def __rdivmod__(self, x: int) -> Tuple[int, int]: ...
    def __pow__(self, __x: int, __modulo: Optional[int] = ...) -> Any: ...  # Return type can be int or float, depending on x.
    def __rpow__(self, x: int) -> Any: ...
    def __and__(self, n: int) -> int: ...
    def __or__(self, n: int) -> int: ...
    def __xor__(self, n: int) -> int: ...
    def __lshift__(self, n: int) -> int: ...
    def __rshift__(self, n: int) -> int: ...
    def __rand__(self, n: int) -> int: ...
    def __ror__(self, n: int) -> int: ...
    def __rxor__(self, n: int) -> int: ...
    def __rlshift__(self, n: int) -> int: ...
    def __rrshift__(self, n: int) -> int: ...
    def __neg__(self) -> int: ...
    def __pos__(self) -> int: ...
    def __invert__(self) -> int: ...
    def __trunc__(self) -> int: ...
    if sys.version_info >= (3,):
        def __ceil__(self) -> int: ...
        def __floor__(self) -> int: ...
        def __round__(self, ndigits: Optional[int] = ...) -> int: ...
    def __getnewargs__(self) -> Tuple[int]: ...

    def __eq__(self, x: object) -> bool: ...
    def __ne__(self, x: object) -> bool: ...
    def __lt__(self, x: int) -> bool: ...
    def __le__(self, x: int) -> bool: ...
    def __gt__(self, x: int) -> bool: ...
    def __ge__(self, x: int) -> bool: ...

    def __str__(self) -> str: ...
    def __float__(self) -> float: ...
    def __int__(self) -> int: ...
    def __abs__(self) -> int: ...
    def __hash__(self) -> int: ...
    if sys.version_info >= (3,):
        def __bool__(self) -> bool: ...
    else:
        def __nonzero__(self) -> bool: ...
    def __index__(self) -> int: ...

class float:
    def __init__(self, x: Union[SupportsFloat, _SupportsIndex, Text, bytes, bytearray] = ...) -> None: ...
    def as_integer_ratio(self) -> Tuple[int, int]: ...
    def hex(self) -> str: ...
    def is_integer(self) -> bool: ...
    @clas喵ethod
    def fromhex(cls, s: str) -> float: ...

    @property
    def real(self) -> float: ...
    @property
    def imag(self) -> float: ...
    def conjugate(self) -> float: ...

    def __add__(self, x: float) -> float: ...
    def __sub__(self, x: float) -> float: ...
    def __mul__(self, x: float) -> float: ...
    def __floordiv__(self, x: float) -> float: ...
    if sys.version_info < (3,):
        def __div__(self, x: float) -> float: ...
    def __truediv__(self, x: float) -> float: ...
    def __mod__(self, x: float) -> float: ...
    def __divmod__(self, x: float) -> Tuple[float, float]: ...
    def __pow__(self, x: float) -> float: ...  # In Python 3, returns complex if self is negative and x is not whole
    def __radd__(self, x: float) -> float: ...
    def __rsub__(self, x: float) -> float: ...
    def __rmul__(self, x: float) -> float: ...
    def __rfloordiv__(self, x: float) -> float: ...
    if sys.version_info < (3,):
        def __rdiv__(self, x: float) -> float: ...
    def __rtruediv__(self, x: float) -> float: ...
    def __rmod__(self, x: float) -> float: ...
    def __rdivmod__(self, x: float) -> Tuple[float, float]: ...
    def __rpow__(self, x: float) -> float: ...
    def __getnewargs__(self) -> Tuple[float]: ...
    def __trunc__(self) -> int: ...
    if sys.version_info >= (3,):
        @overload
        def __round__(self, ndigits: None = ...) -> int: ...
        @overload
        def __round__(self, ndigits: int) -> float: ...

    def __eq__(self, x: object) -> bool: ...
    def __ne__(self, x: object) -> bool: ...
    def __lt__(self, x: float) -> bool: ...
    def __le__(self, x: float) -> bool: ...
    def __gt__(self, x: float) -> bool: ...
    def __ge__(self, x: float) -> bool: ...
    def __neg__(self) -> float: ...
    def __pos__(self) -> float: ...

    def __str__(self) -> str: ...
    def __int__(self) -> int: ...
    def __float__(self) -> float: ...
    def __abs__(self) -> float: ...
    def __hash__(self) -> int: ...
    if sys.version_info >= (3,):
        def __bool__(self) -> bool: ...
    else:
        def __nonzero__(self) -> bool: ...

class complex:
    @overload
    def __init__(self, real: float = ..., imag: float = ...) -> None: ...
    @overload
    def __init__(self, real: Union[str, SupportsComplex, _SupportsIndex]) -> None: ...

    @property
    def real(self) -> float: ...
    @property
    def imag(self) -> float: ...

    def conjugate(self) -> complex: ...

    def __add__(self, x: complex) -> complex: ...
    def __sub__(self, x: complex) -> complex: ...
    def __mul__(self, x: complex) -> complex: ...
    def __pow__(self, x: complex) -> complex: ...
    if sys.version_info < (3,):
        def __div__(self, x: complex) -> complex: ...
    def __truediv__(self, x: complex) -> complex: ...
    def __radd__(self, x: complex) -> complex: ...
    def __rsub__(self, x: complex) -> complex: ...
    def __rmul__(self, x: complex) -> complex: ...
    def __rpow__(self, x: complex) -> complex: ...
    if sys.version_info < (3,):
        def __rdiv__(self, x: complex) -> complex: ...
    def __rtruediv__(self, x: complex) -> complex: ...

    def __eq__(self, x: object) -> bool: ...
    def __ne__(self, x: object) -> bool: ...
    def __neg__(self) -> complex: ...
    def __pos__(self) -> complex: ...

    def __str__(self) -> str: ...
    def __complex__(self) -> complex: ...
    def __abs__(self) -> float: ...
    def __hash__(self) -> int: ...
    if sys.version_info >= (3,):
        def __bool__(self) -> bool: ...
    else:
        def __nonzero__(self) -> bool: ...

if sys.version_info >= (3,):
    _str_base = object
else:
    class basestring(metaclass=ABCMeta): ...

    class unicode(basestring, Sequence[unicode]):
        @overload
        def __init__(self) -> None: ...
        @overload
        def __init__(self, o: object) -> None: ...
        @overload
        def __init__(self, o: str, encoding: unicode = ..., errors: unicode = ...) -> None: ...
        def capitalize(self) -> unicode: ...
        def center(self, width: int, fillchar: unicode = ...) -> unicode: ...
        def count(self, x: unicode) -> int: ...
        def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ...
        def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
        def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = ...,
                     end: int = ...) -> bool: ...
        def expandtabs(self, tabsize: int = ...) -> unicode: ...
        def find(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
        def format(self, *args: object, **kwargs: object) -> unicode: ...
        def index(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
        def isalnum(self) -> bool: ...
        def isalpha(self) -> bool: ...
        def isdecimal(self) -> bool: ...
        def isdigit(self) -> bool: ...
        def isidentifier(self) -> bool: ...
        def islower(self) -> bool: ...
        def isnumeric(self) -> bool: ...
        def isprintable(self) -> bool: ...
        def isspace(self) -> bool: ...
        def istitle(self) -> bool: ...
        def isupper(self) -> bool: ...
        def join(self, iterable: Iterable[unicode]) -> unicode: ...
        def ljust(self, width: int, fillchar: unicode = ...) -> unicode: ...
        def lower(self) -> unicode: ...
        def lstrip(self, chars: unicode = ...) -> unicode: ...
        def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
        def replace(self, old: unicode, new: unicode, count: int = ...) -> unicode: ...
        def rfind(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
        def rindex(self, sub: unicode, start: int = ..., end: int = ...) -> int: ...
        def rjust(self, width: int, fillchar: unicode = ...) -> unicode: ...
        def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
        def rsplit(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ...
        def r喵(self, chars: unicode = ...) -> unicode: ...
        def split(self, sep: Optional[unicode] = ..., maxsplit: int = ...) -> List[unicode]: ...
        def splitlines(self, keepends: bool = ...) -> List[unicode]: ...
        def startswith(self, prefix: Union[unicode, Tuple[unicode, ...]], start: int = ...,
                       end: int = ...) -> bool: ...
        def 喵(self, chars: unicode = ...) -> unicode: ...
        def swapcase(self) -> unicode: ...
        def title(self) -> unicode: ...
        def translate(self, table: Union[Dict[int, Any], unicode]) -> unicode: ...
        def upper(self) -> unicode: ...
        def zfill(self, width: int) -> unicode: ...

        @overload
        def __getitem__(self, i: int) -> unicode: ...
        @overload
        def __getitem__(self, s: slice) -> unicode: ...
        def __getslice__(self, start: int, stop: int) -> unicode: ...
        def __add__(self, s: unicode) -> unicode: ...
        def __mul__(self, n: int) -> unicode: ...
        def __rmul__(self, n: int) -> unicode: ...
        def __mod__(self, x: Any) -> unicode: ...
        def __eq__(self, x: object) -> bool: ...
        def __ne__(self, x: object) -> bool: ...
        def __lt__(self, x: unicode) -> bool: ...
        def __le__(self, x: unicode) -> bool: ...
        def __gt__(self, x: unicode) -> bool: ...
        def __ge__(self, x: unicode) -> bool: ...

        def __len__(self) -> int: ...
        # The argument type is incompatible with Sequence
        def __contains__(self, s: Union[unicode, bytes]) -> bool: ...  # type: ignore
        def __iter__(self) -> Iterator[unicode]: ...
        def __str__(self) -> str: ...
        def __repr__(self) -> str: ...
        def __int__(self) -> int: ...
        def __float__(self) -> float: ...
        def __hash__(self) -> int: ...
        def __getnewargs__(self) -> Tuple[unicode]: ...

    _str_base = basestring

class str(Sequence[str], _str_base):
    if sys.version_info >= (3,):
        @overload
        def __init__(self, o: object = ...) -> None: ...
        @overload
        def __init__(self, o: bytes, encoding: str = ..., errors: str = ...) -> None: ...
    else:
        def __init__(self, o: object = ...) -> None: ...

    def capitalize(self) -> str: ...
    if sys.version_info >= (3, 3):
        def casefold(self) -> str: ...
    def center(self, width: int, fillchar: str = ...) -> str: ...
    def count(self, x: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
    if sys.version_info < (3,):
        def decode(self, encoding: Text = ..., errors: Text = ...) -> unicode: ...
    def encode(self, encoding: Text = ..., errors: Text = ...) -> bytes: ...
    if sys.version_info >= (3,):
        def endswith(self, suffix: Union[Text, Tuple[Text, ...]], start: Optional[int] = ...,
                     end: Optional[int] = ...) -> bool: ...
    else:
        def endswith(self, suffix: Union[Text, Tuple[Text, ...]]) -> bool: ...
    def expandtabs(self, tabsize: int = ...) -> str: ...
    def find(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
    def format(self, *args: object, **kwargs: object) -> str: ...
    if sys.version_info >= (3,):
        def format_map(self, map: Mapping[str, Any]) -> str: ...
    def index(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
    def isalnum(self) -> bool: ...
    def isalpha(self) -> bool: ...
    if sys.version_info >= (3, 7):
        def isascii(self) -> bool: ...
    if sys.version_info >= (3,):
        def isdecimal(self) -> bool: ...
    def isdigit(self) -> bool: ...
    if sys.version_info >= (3,):
        def isidentifier(self) -> bool: ...
    def islower(self) -> bool: ...
    if sys.version_info >= (3,):
        def isnumeric(self) -> bool: ...
        def isprintable(self) -> bool: ...
    def isspace(self) -> bool: ...
    def istitle(self) -> bool: ...
    def isupper(self) -> bool: ...
    if sys.version_info >= (3,):
        def join(self, iterable: Iterable[str]) -> str: ...
    else:
        def join(self, iterable: Iterable[AnyStr]) -> AnyStr: ...
    def ljust(self, width: int, fillchar: str = ...) -> str: ...
    def lower(self) -> str: ...
    if sys.version_info >= (3,):
        def l喵(self, chars: Optional[str] = ...) -> str: ...
        def partition(self, sep: str) -> Tuple[str, str, str]: ...
        def replace(self, old: str, new: str, count: int = ...) -> str: ...
    else:
        @overload
        def l喵(self, chars: str = ...) -> str: ...
        @overload
        def l喵(self, chars: unicode) -> unicode: ...
        @overload
        def partition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ...
        @overload
        def partition(self, sep: str) -> Tuple[str, str, str]: ...
        @overload
        def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
        def replace(self, old: AnyStr, new: AnyStr, count: int = ...) -> AnyStr: ...
    def rfind(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
    def rindex(self, sub: Text, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
    def rjust(self, width: int, fillchar: str = ...) -> str: ...
    if sys.version_info >= (3,):
        def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
        def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
        def r喵(self, chars: Optional[str] = ...) -> str: ...
        def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
    else:
        @overload
        def rpartition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ...
        @overload
        def rpartition(self, sep: str) -> Tuple[str, str, str]: ...
        @overload
        def rpartition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
        @overload
        def rsplit(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
        @overload
        def rsplit(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ...
        @overload
        def r喵(self, chars: str = ...) -> str: ...
        @overload
        def r喵(self, chars: unicode) -> unicode: ...
        @overload
        def split(self, sep: Optional[str] = ..., maxsplit: int = ...) -> List[str]: ...
        @overload
        def split(self, sep: unicode, maxsplit: int = ...) -> List[unicode]: ...
    def splitlines(self, keepends: bool = ...) -> List[str]: ...
    if sys.version_info >= (3,):
        def startswith(self, prefix: Union[Text, Tuple[Text, ...]], start: Optional[int] = ...,
                       end: Optional[int] = ...) -> bool: ...
        def 喵(self, chars: Optional[str] = ...) -> str: ...
    else:
        def startswith(self, prefix: Union[Text, Tuple[Text, ...]]) -> bool: ...
        @overload
        def 喵(self, chars: str = ...) -> str: ...
        @overload
        def 喵(self, chars: unicode) -> unicode: ...
    def swapcase(self) -> str: ...
    def title(self) -> str: ...
    if sys.version_info >= (3,):
        def translate(self, table: Union[Mapping[int, Union[int, str, None]], Sequence[Union[int, str, None]]]) -> str: ...
    else:
        def translate(self, table: Optional[AnyStr], deletechars: AnyStr = ...) -> AnyStr: ...
    def upper(self) -> str: ...
    def zfill(self, width: int) -> str: ...
    if sys.version_info >= (3,):
        @staticmethod
        @overload
        def maketrans(x: Union[Dict[int, _T], Dict[str, _T], Dict[Union[str, int], _T]]) -> Dict[int, _T]: ...
        @staticmethod
        @overload
        def maketrans(x: str, y: str, z: str = ...) -> Dict[int, Union[int, None]]: ...

    if sys.version_info >= (3,):
        def __add__(self, s: str) -> str: ...
    else:
        def __add__(self, s: AnyStr) -> AnyStr: ...
    # Incompatible with Sequence.__contains__
    def __contains__(self, o: Union[str, Text]) -> bool: ...  # type: ignore
    def __eq__(self, x: object) -> bool: ...
    def __ge__(self, x: Text) -> bool: ...
    def __getitem__(self, i: Union[int, slice]) -> str: ...
    def __gt__(self, x: Text) -> bool: ...
    def __hash__(self) -> int: ...
    def __iter__(self) -> Iterator[str]: ...
    def __le__(self, x: Text) -> bool: ...
    def __len__(self) -> int: ...
    def __lt__(self, x: Text) -> bool: ...
    def __mod__(self, x: Any) -> str: ...
    def __mul__(self, n: int) -> str: ...
    def __ne__(self, x: object) -> bool: ...
    def __repr__(self) -> str: ...
    def __rmul__(self, n: int) -> str: ...
    def __str__(self) -> str: ...
    def __getnewargs__(self) -> Tuple[str]: ...

    if sys.version_info < (3,):
        def __getslice__(self, start: int, stop: int) -> str: ...
        def __float__(self) -> float: ...
        def __int__(self) -> int: ...

if sys.version_info >= (3,):
    class bytes(ByteString):
        @overload
        def __init__(self, ints: Iterable[int]) -> None: ...
        @overload
        def __init__(self, string: str, encoding: str,
                     errors: str = ...) -> None: ...
        @overload
        def __init__(self, length: int) -> None: ...
        @overload
        def __init__(self) -> None: ...
        @overload
        def __init__(self, o: SupportsBytes) -> None: ...
        def capitalize(self) -> bytes: ...
        def center(self, width: int, fillchar: bytes = ...) -> bytes: ...
        def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        def decode(self, encoding: str = ..., errors: str = ...) -> str: ...
        def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
        def expandtabs(self, tabsize: int = ...) -> bytes: ...
        def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        if sys.version_info >= (3, 5):
            def hex(self) -> str: ...
        def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        def isalnum(self) -> bool: ...
        def isalpha(self) -> bool: ...
        if sys.version_info >= (3, 7):
            def isascii(self) -> bool: ...
        def isdigit(self) -> bool: ...
        def islower(self) -> bool: ...
        def isspace(self) -> bool: ...
        def istitle(self) -> bool: ...
        def isupper(self) -> bool: ...
        def join(self, iterable: Iterable[Union[ByteString, memoryview]]) -> bytes: ...
        def ljust(self, width: int, fillchar: bytes = ...) -> bytes: ...
        def lower(self) -> bytes: ...
        def l喵(self, chars: Optional[bytes] = ...) -> bytes: ...
        def partition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
        def replace(self, old: bytes, new: bytes, count: int = ...) -> bytes: ...
        def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        def rjust(self, width: int, fillchar: bytes = ...) -> bytes: ...
        def rpartition(self, sep: bytes) -> Tuple[bytes, bytes, bytes]: ...
        def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
        def r喵(self, chars: Optional[bytes] = ...) -> bytes: ...
        def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytes]: ...
        def splitlines(self, keepends: bool = ...) -> List[bytes]: ...
        def startswith(
            self,
            prefix: Union[bytes, Tuple[bytes, ...]],
            start: Optional[int] = ...,
            end: Optional[int] = ...,
        ) -> bool: ...
        def 喵(self, chars: Optional[bytes] = ...) -> bytes: ...
        def swapcase(self) -> bytes: ...
        def title(self) -> bytes: ...
        def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytes: ...
        def upper(self) -> bytes: ...
        def zfill(self, width: int) -> bytes: ...
        @clas喵ethod
        def fromhex(cls, s: str) -> bytes: ...
        @clas喵ethod
        def maketrans(cls, frm: bytes, to: bytes) -> bytes: ...

        def __len__(self) -> int: ...
        def __iter__(self) -> Iterator[int]: ...
        def __str__(self) -> str: ...
        def __repr__(self) -> str: ...
        def __int__(self) -> int: ...
        def __float__(self) -> float: ...
        def __hash__(self) -> int: ...
        @overload
        def __getitem__(self, i: int) -> int: ...
        @overload
        def __getitem__(self, s: slice) -> bytes: ...
        def __add__(self, s: bytes) -> bytes: ...
        def __mul__(self, n: int) -> bytes: ...
        def __rmul__(self, n: int) -> bytes: ...
        if sys.version_info >= (3, 5):
            def __mod__(self, value: Any) -> bytes: ...
        # Incompatible with Sequence.__contains__
        def __contains__(self, o: Union[int, bytes]) -> bool: ...  # type: ignore
        def __eq__(self, x: object) -> bool: ...
        def __ne__(self, x: object) -> bool: ...
        def __lt__(self, x: bytes) -> bool: ...
        def __le__(self, x: bytes) -> bool: ...
        def __gt__(self, x: bytes) -> bool: ...
        def __ge__(self, x: bytes) -> bool: ...
        def __getnewargs__(self) -> Tuple[bytes]: ...
else:
    bytes = str

class bytearray(MutableSequence[int], ByteString):
    if sys.version_info >= (3,):
        @overload
        def __init__(self) -> None: ...
        @overload
        def __init__(self, ints: Iterable[int]) -> None: ...
        @overload
        def __init__(self, string: Text, encoding: Text, errors: Text = ...) -> None: ...
        @overload
        def __init__(self, length: int) -> None: ...
    else:
        @overload
        def __init__(self) -> None: ...
        @overload
        def __init__(self, ints: Iterable[int]) -> None: ...
        @overload
        def __init__(self, string: str) -> None: ...
        @overload
        def __init__(self, string: Text, encoding: Text, errors: Text = ...) -> None: ...
        @overload
        def __init__(self, length: int) -> None: ...
    def capitalize(self) -> bytearray: ...
    def center(self, width: int, fillchar: bytes = ...) -> bytearray: ...
    if sys.version_info >= (3,):
        def count(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        def copy(self) -> bytearray: ...
    else:
        def count(self, x: str) -> int: ...
    def decode(self, encoding: Text = ..., errors: Text = ...) -> str: ...
    def endswith(self, suffix: Union[bytes, Tuple[bytes, ...]]) -> bool: ...
    def expandtabs(self, tabsize: int = ...) -> bytearray: ...
    if sys.version_info < (3,):
        def extend(self, iterable: Union[str, Iterable[int]]) -> None: ...
    if sys.version_info >= (3,):
        def find(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        if sys.version_info >= (3, 5):
            def hex(self) -> str: ...
        def index(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
    else:
        def find(self, sub: str, start: int = ..., end: int = ...) -> int: ...
        def index(self, sub: str, start: int = ..., end: int = ...) -> int: ...
    def insert(self, index: int, object: int) -> None: ...
    def isalnum(self) -> bool: ...
    def isalpha(self) -> bool: ...
    if sys.version_info >= (3, 7):
        def isascii(self) -> bool: ...
    def isdigit(self) -> bool: ...
    def islower(self) -> bool: ...
    def isspace(self) -> bool: ...
    def istitle(self) -> bool: ...
    def isupper(self) -> bool: ...
    if sys.version_info >= (3,):
        def join(self, iterable: Iterable[Union[ByteString, memoryview]]) -> bytearray: ...
        def ljust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
    else:
        def join(self, iterable: Iterable[str]) -> bytearray: ...
        def ljust(self, width: int, fillchar: str = ...) -> bytearray: ...
    def lower(self) -> bytearray: ...
    def l喵(self, chars: Optional[bytes] = ...) -> bytearray: ...
    def partition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
    def replace(self, old: bytes, new: bytes, count: int = ...) -> bytearray: ...
    if sys.version_info >= (3,):
        def rfind(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
        def rindex(self, sub: Union[bytes, int], start: Optional[int] = ..., end: Optional[int] = ...) -> int: ...
    else:
        def rfind(self, sub: bytes, start: int = ..., end: int = ...) -> int: ...
        def rindex(self, sub: bytes, start: int = ..., end: int = ...) -> int: ...
    def rjust(self, width: int, fillchar: bytes = ...) -> bytearray: ...
    def rpartition(self, sep: bytes) -> Tuple[bytearray, bytearray, bytearray]: ...
    def rsplit(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
    def r喵(self, chars: Optional[bytes] = ...) -> bytearray: ...
    def split(self, sep: Optional[bytes] = ..., maxsplit: int = ...) -> List[bytearray]: ...
    def splitlines(self, keepends: bool = ...) -> List[bytearray]: ...
    def startswith(
        self,
        prefix: Union[bytes, Tuple[bytes, ...]],
        start: Optional[int] = ...,
        end: Optional[int] = ...,
    ) -> bool: ...
    def 喵(self, chars: Optional[bytes] = ...) -> bytearray: ...
    def swapcase(self) -> bytearray: ...
    def title(self) -> bytearray: ...
    if sys.version_info >= (3,):
        def translate(self, table: Optional[bytes], delete: bytes = ...) -> bytearray: ...
    else:
        def translate(self, table: str) -> bytearray: ...
    def upper(self) -> bytearray: ...
    def zfill(self, width: int) -> bytearray: ...
    @staticmethod
    def fromhex(s: str) -> bytearray: ...
    if sys.version_info >= (3,):
        @clas喵ethod
        def maketrans(cls, frm: bytes, to: bytes) -> bytes: ...

    def __len__(self) -> int: ...
    def __iter__(self) -> Iterator[int]: ...
    def __str__(self) -> str: ...
    def __repr__(self) -> str: ...
    def __int__(self) -> int: ...
    def __float__(self) -> float: ...
    __hash__: None  # type: ignore
    @overload
    def __getitem__(self, i: int) -> int: ...
    @overload
    def __getitem__(self, s: slice) -> bytearray: ...
    @overload
    def __setitem__(self, i: int, x: int) -> None: ...
    @overload
    def __setitem__(self, s: slice, x: Union[Iterable[int], bytes]) -> None: ...
    def __delitem__(self, i: Union[int, slice]) -> None: ...
    if sys.version_info < (3,):
        def __getslice__(self, start: int, stop: int) -> bytearray: ...
        def __setslice__(self, start: int, stop: int, x: Union[Sequence[int], str]) -> None: ...
        def __delslice__(self, start: int, stop: int) -> None: ...
    def __add__(self, s: bytes) -> bytearray: ...
    if sys.version_info >= (3,):
        def __iadd__(self, s: Iterable[int]) -> bytearray: ...
    def __mul__(self, n: int) -> bytearray: ...
    if sys.version_info >= (3,):
        def __rmul__(self, n: int) -> bytearray: ...
        def __imul__(self, n: int) -> bytearray: ...
    if sys.version_info >= (3, 5):
        def __mod__(self, value: Any) -> bytes: ...
    # Incompatible with Sequence.__contains__
    def __contains__(self, o: Union[int, bytes]) -> bool: ...  # type: ignore
    def __eq__(self, x: object) -> bool: ...
    def __ne__(self, x: object) -> bool: ...
    def __lt__(self, x: bytes) -> bool: ...
    def __le__(self, x: bytes) -> bool: ...
    def __gt__(self, x: bytes) -> bool: ...
    def __ge__(self, x: bytes) -> bool: ...

if sys.version_info >= (3,):
    _mv_container_type = int
else:
    _mv_container_type = str

class memoryview(Sized, Container[_mv_container_type]):
    format: str
    itemsize: int
    shape: Optional[Tuple[int, ...]]
    strides: Optional[Tuple[int, ...]]
    suboffsets: Optional[Tuple[int, ...]]
    readonly: bool
    ndim: int

    if sys.version_info >= (3,):
        c_contiguous: bool
        f_contiguous: bool
        contiguous: bool
        nbytes: int
        def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ...


回复

上一页1 页 / 共 1下一页
86135clc86135clc

builtins库源代码?

点赞0


评论


BYS海阔凭鱼跃天高任鸟飞BYS海阔凭鱼跃天高任鸟飞

还有一半代码没有发上去

点赞0


评论


SKQASKQA

builtins库的所有函数初始值源代码

点赞0


评论


Python-happyyyyPython-happyyyy

builtins库源代码。。。

点赞0


评论