{
    "mode": "pydoc",
    "parameter": "typing",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/typing/json",
    "generated": "2026-06-02T14:17:44Z",
    "sections": {
        "NAME": {
            "content": "typing - The typing module: Support for gradual typing as defined by PEP 484.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/typing.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "At large scale, the structure of the module is following:\n* Imports and exports, all public names should be explicitly added to all.\n* Internal helper functions: these should never be used in code outside this module.\n* SpecialForm and its instances (special forms):\nAny, NoReturn, ClassVar, Union, Optional, Concatenate\n* Classes whose instances can be type arguments in addition to types:\nForwardRef, TypeVar and ParamSpec\n* The core of internal generics API: GenericAlias and VariadicGenericAlias, the latter is\ncurrently only used by Tuple and Callable. All subscripted types like X[int], Union[int, str],\netc., are instances of either of these classes.\n* The public counterpart of the generics API consists of two classes: Generic and Protocol.\n* Public helper functions: gettypehints, overload, cast, notypecheck,\nnotypecheckdecorator.\n* Generic aliases for collections.abc ABCs and few additional protocols.\n* Special types: NewType, NamedTuple, TypedDict.\n* Wrapper submodules for re and io related types.\n",
            "subsections": []
        },
        "CLASSES": {
            "content": "builtins.object\nbuiltins.str\nAnnotated\nGeneric\nIO\nBinaryIO\nTextIO\nProtocol\nSupportsAbs\nSupportsBytes\nSupportsComplex\nSupportsFloat\nSupportsIndex\nSupportsInt\nSupportsRound\nNewType\nFinal(builtins.object)\nForwardRef\nParamSpec(Final, Immutable, TypeVarLike)\nParamSpecArgs(Final, Immutable)\nParamSpecKwargs(Final, Immutable)\nTypeVar(Final, Immutable, TypeVarLike)\nImmutable(builtins.object)\nParamSpec(Final, Immutable, TypeVarLike)\nParamSpecArgs(Final, Immutable)\nParamSpecKwargs(Final, Immutable)\nTypeVar(Final, Immutable, TypeVarLike)\nTypeVarLike(builtins.object)\nParamSpec(Final, Immutable, TypeVarLike)\nTypeVar(Final, Immutable, TypeVarLike)\n",
            "subsections": [
                {
                    "name": "class Annotated",
                    "content": "|  Annotated(*args, kwargs)\n|\n|  Add context specific metadata to a type.\n|\n|  Example: Annotated[int, runtimecheck.Unsigned] indicates to the\n|  hypothetical runtimecheck module that this type is an unsigned int.\n|  Every other consumer of this type can ignore this metadata and treat\n|  this type as int.\n|\n|  The first argument to Annotated must be a valid type.\n|\n|  Details:\n|\n|  - It's an error to call `Annotated` with less than two arguments.\n|  - Nested Annotated are flattened::\n|\n|      Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3]\n|\n|  - Instantiating an annotated type is equivalent to instantiating the\n|  underlying type::\n|\n|      Annotated[C, Ann1](5) == C(5)\n|\n|  - Annotated can be used as a generic type alias::\n|\n|      Optimized = Annotated[T, runtime.Optimize()]\n|      Optimized[int] == Annotated[int, runtime.Optimize()]\n|\n|      OptimizedList = Annotated[List[T], runtime.Optimize()]\n|      OptimizedList[int] == Annotated[List[int], runtime.Optimize()]\n|\n|  Class methods defined here:\n|\n|  classgetitem(params) from builtins.type\n|\n|  initsubclass(*args, kwargs) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(cls, *args, kwargs)\n|      Create and return a new object.  See help(type) for accurate signature.\n"
                },
                {
                    "name": "class BinaryIO",
                    "content": "|  Typed version of the return of open() in binary mode.\n|\n|  Method resolution order:\n|      BinaryIO\n|      IO\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  enter(self) -> 'BinaryIO'\n|\n|  write(self, s: Union[bytes, bytearray]) -> int\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  origbases = (typing.IO[bytes],)\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from IO:\n|\n|  exit(self, type, value, traceback) -> None\n|\n|  close(self) -> None\n|\n|  fileno(self) -> int\n|\n|  flush(self) -> None\n|\n|  isatty(self) -> bool\n|\n|  read(self, n: int = -1) -> ~AnyStr\n|\n|  readable(self) -> bool\n|\n|  readline(self, limit: int = -1) -> ~AnyStr\n|\n|  readlines(self, hint: int = -1) -> List[~AnyStr]\n|\n|  seek(self, offset: int, whence: int = 0) -> int\n|\n|  seekable(self) -> bool\n|\n|  tell(self) -> int\n|\n|  truncate(self, size: int = None) -> int\n|\n|  writable(self) -> bool\n|\n|  writelines(self, lines: List[~AnyStr]) -> None\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from IO:\n|\n|  closed\n|\n|  mode\n|\n|  name\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from builtins.type\n|\n|  initsubclass(*args, kwargs) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n"
                },
                {
                    "name": "class ForwardRef",
                    "content": "|  ForwardRef(arg, isargument=True, module=None, *, isclass=False)\n|\n|  Internal wrapper to hold a forward reference.\n|\n|  Method resolution order:\n|      ForwardRef\n|      Final\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  hash(self)\n|      Return hash(self).\n|\n|  init(self, arg, isargument=True, module=None, *, isclass=False)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  forwardarg\n|\n|  forwardcode\n|\n|  forwardevaluated\n|\n|  forwardisargument\n|\n|  forwardisclass\n|\n|  forwardmodule\n|\n|  forwardvalue\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Final:\n|\n|  initsubclass(*args, kwds) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Final:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class Generic",
                    "content": "|  Abstract base class for generic types.\n|\n|  A generic type is typically declared by inheriting from\n|  this class parameterized with one or more type variables.\n|  For example, a generic mapping type might be defined as::\n|\n|    class Mapping(Generic[KT, VT]):\n|        def getitem(self, key: KT) -> VT:\n|            ...\n|        # Etc.\n|\n|  This class can then be used as follows::\n|\n|    def lookupname(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT:\n|        try:\n|            return mapping[key]\n|        except KeyError:\n|            return default\n|\n|  Class methods defined here:\n|\n|  classgetitem(params) from builtins.type\n|\n|  initsubclass(*args, kwargs) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n"
                },
                {
                    "name": "class IO",
                    "content": "|  Generic base class for TextIO and BinaryIO.\n|\n|  This is an abstract, generic version of the return of open().\n|\n|  NOTE: This does not distinguish between the different possible\n|  classes (text vs. binary, read vs. write vs. read/write,\n|  append-only, unbuffered).  The TextIO and BinaryIO subclasses\n|  below capture the distinctions between text vs. binary, which is\n|  pervasive in the interface; however we currently do not offer a\n|  way to track the other distinctions in the type system.\n|\n|  Method resolution order:\n|      IO\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  enter(self) -> 'IO[AnyStr]'\n|\n|  exit(self, type, value, traceback) -> None\n|\n|  close(self) -> None\n|\n|  fileno(self) -> int\n|\n|  flush(self) -> None\n|\n|  isatty(self) -> bool\n|\n|  read(self, n: int = -1) -> ~AnyStr\n|\n|  readable(self) -> bool\n|\n|  readline(self, limit: int = -1) -> ~AnyStr\n|\n|  readlines(self, hint: int = -1) -> List[~AnyStr]\n|\n|  seek(self, offset: int, whence: int = 0) -> int\n|\n|  seekable(self) -> bool\n|\n|  tell(self) -> int\n|\n|  truncate(self, size: int = None) -> int\n|\n|  writable(self) -> bool\n|\n|  write(self, s: ~AnyStr) -> int\n|\n|  writelines(self, lines: List[~AnyStr]) -> None\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  closed\n|\n|  mode\n|\n|  name\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  origbases = (typing.Generic[~AnyStr],)\n|\n|  parameters = (~AnyStr,)\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from builtins.type\n|\n|  initsubclass(*args, kwargs) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n"
                },
                {
                    "name": "class NewType",
                    "content": "|  NewType(name, tp)\n|\n|  NewType creates simple unique types with almost zero\n|  runtime overhead. NewType(name, tp) is considered a subtype of tp\n|  by static type checkers. At runtime, NewType(name, tp) returns\n|  a dummy callable that simply returns its argument. Usage::\n|\n|      UserId = NewType('UserId', int)\n|\n|      def namebyid(userid: UserId) -> str:\n|          ...\n|\n|      UserId('user')          # Fails type check\n|\n|      namebyid(42)          # Fails type check\n|      namebyid(UserId(42))  # OK\n|\n|      num = UserId(5) + 1     # type: int\n|\n|  Methods defined here:\n|\n|  call(self, x)\n|      Call self as a function.\n|\n|  init(self, name, tp)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  or(self, other)\n|      Return self|value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ror(self, other)\n|      Return value|self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n"
                },
                {
                    "name": "class ParamSpec",
                    "content": "|  ParamSpec(name, *, bound=None, covariant=False, contravariant=False)\n|\n|  Parameter specification variable.\n|\n|  Usage::\n|\n|     P = ParamSpec('P')\n|\n|  Parameter specification variables exist primarily for the benefit of static\n|  type checkers.  They are used to forward the parameter types of one\n|  callable to another callable, a pattern commonly found in higher order\n|  functions and decorators.  They are only valid when used in ``Concatenate``,\n|  or as the first argument to ``Callable``, or as parameters for user-defined\n|  Generics.  See class Generic for more information on generic types.  An\n|  example for annotating a decorator::\n|\n|     T = TypeVar('T')\n|     P = ParamSpec('P')\n|\n|     def addlogging(f: Callable[P, T]) -> Callable[P, T]:\n|         '''A type-safe decorator to add logging to a function.'''\n|         def inner(*args: P.args, kwargs: P.kwargs) -> T:\n|             logging.info(f'{f.name} was called')\n|             return f(*args, kwargs)\n|         return inner\n|\n|     @addlogging\n|     def addtwo(x: float, y: float) -> float:\n|         '''Add two numbers together.'''\n|         return x + y\n|\n|  Parameter specification variables defined with covariant=True or\n|  contravariant=True can be used to declare covariant or contravariant\n|  generic types.  These keyword arguments are valid, but their actual semantics\n|  are yet to be decided.  See PEP 612 for details.\n|\n|  Parameter specification variables can be introspected. e.g.:\n|\n|     P.name == 'P'\n|     P.bound == None\n|     P.covariant == False\n|     P.contravariant == False\n|\n|  Note that only parameter specification variables defined in global scope can\n|  be pickled.\n|\n|  Method resolution order:\n|      ParamSpec\n|      Final\n|      Immutable\n|      TypeVarLike\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, name, *, bound=None, covariant=False, contravariant=False)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  args\n|\n|  kwargs\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  bound\n|\n|  contravariant\n|\n|  covariant\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Final:\n|\n|  initsubclass(*args, kwds) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Final:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Immutable:\n|\n|  copy(self)\n|\n|  deepcopy(self, memo)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TypeVarLike:\n|\n|  or(self, right)\n|      Return self|value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ror(self, left)\n|      Return value|self.\n"
                },
                {
                    "name": "class ParamSpecArgs",
                    "content": "|  ParamSpecArgs(origin)\n|\n|  The args for a ParamSpec object.\n|\n|  Given a ParamSpec object P, P.args is an instance of ParamSpecArgs.\n|\n|  ParamSpecArgs objects have a reference back to their ParamSpec:\n|\n|     P.args.origin is P\n|\n|  This type is meant for runtime introspection and has no special meaning to\n|  static type checkers.\n|\n|  Method resolution order:\n|      ParamSpecArgs\n|      Final\n|      Immutable\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  init(self, origin)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  hash = None\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Final:\n|\n|  initsubclass(*args, kwds) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Final:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Immutable:\n|\n|  copy(self)\n|\n|  deepcopy(self, memo)\n"
                },
                {
                    "name": "class ParamSpecKwargs",
                    "content": "|  ParamSpecKwargs(origin)\n|\n|  The kwargs for a ParamSpec object.\n|\n|  Given a ParamSpec object P, P.kwargs is an instance of ParamSpecKwargs.\n|\n|  ParamSpecKwargs objects have a reference back to their ParamSpec:\n|\n|     P.kwargs.origin is P\n|\n|  This type is meant for runtime introspection and has no special meaning to\n|  static type checkers.\n|\n|  Method resolution order:\n|      ParamSpecKwargs\n|      Final\n|      Immutable\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  eq(self, other)\n|      Return self==value.\n|\n|  init(self, origin)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  hash = None\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Final:\n|\n|  initsubclass(*args, kwds) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Final:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Immutable:\n|\n|  copy(self)\n|\n|  deepcopy(self, memo)\n"
                },
                {
                    "name": "class Protocol",
                    "content": "|  Base class for protocol classes.\n|\n|  Protocol classes are defined as::\n|\n|      class Proto(Protocol):\n|          def meth(self) -> int:\n|              ...\n|\n|  Such classes are primarily used with static type checkers that recognize\n|  structural subtyping (static duck-typing), for example::\n|\n|      class C:\n|          def meth(self) -> int:\n|              return 0\n|\n|      def func(x: Proto) -> int:\n|          return x.meth()\n|\n|      func(C())  # Passes static type check\n|\n|  See PEP 544 for details. Protocol classes decorated with\n|  @typing.runtimecheckable act as simple-minded runtime protocols that check\n|  only the presence of given attributes, ignoring their type signatures.\n|  Protocol classes can be generic, they are defined as::\n|\n|      class GenProto(Protocol[T]):\n|          def meth(self) -> T:\n|              ...\n|\n|  Method resolution order:\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Class methods defined here:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsAbs",
                    "content": "|  SupportsAbs(*args, kwargs)\n|\n|  An ABC with one abstract method abs that is covariant in its return type.\n|\n|  Method resolution order:\n|      SupportsAbs\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  abs(self) -> +Tco\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'abs'})\n|\n|  origbases = (typing.Protocol[+Tco],)\n|\n|  parameters = (+Tco,)\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsBytes",
                    "content": "|  SupportsBytes(*args, kwargs)\n|\n|  An ABC with one abstract method bytes.\n|\n|  Method resolution order:\n|      SupportsBytes\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  bytes(self) -> bytes\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'bytes'})\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsComplex",
                    "content": "|  SupportsComplex(*args, kwargs)\n|\n|  An ABC with one abstract method complex.\n|\n|  Method resolution order:\n|      SupportsComplex\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  complex(self) -> complex\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'complex'})\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsFloat",
                    "content": "|  SupportsFloat(*args, kwargs)\n|\n|  An ABC with one abstract method float.\n|\n|  Method resolution order:\n|      SupportsFloat\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  float(self) -> float\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'float'})\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsIndex",
                    "content": "|  SupportsIndex(*args, kwargs)\n|\n|  An ABC with one abstract method index.\n|\n|  Method resolution order:\n|      SupportsIndex\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  index(self) -> int\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'index'})\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsInt",
                    "content": "|  SupportsInt(*args, kwargs)\n|\n|  An ABC with one abstract method int.\n|\n|  Method resolution order:\n|      SupportsInt\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  int(self) -> int\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'int'})\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n"
                },
                {
                    "name": "class SupportsRound",
                    "content": "|  SupportsRound(*args, kwargs)\n|\n|  An ABC with one abstract method round that is covariant in its return type.\n|\n|  Method resolution order:\n|      SupportsRound\n|      Protocol\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init = noinitorreplaceinit(self, *args, kwargs)\n|\n|  round(self, ndigits: int = 0) -> +Tco\n|\n|  subclasshook = protohook(other)\n|      # Set (or override) the protocol subclass hook.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset({'round'})\n|\n|  origbases = (typing.Protocol[+Tco],)\n|\n|  parameters = (+Tco,)\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Protocol:\n|\n|  initsubclass(*args, kwargs) from ProtocolMeta\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from ProtocolMeta\n\nText = class str(object)\n|  str(object='') -> str\n|  str(bytesorbuffer[, encoding[, errors]]) -> str\n|\n|  Create a new string object from the given object. If encoding or\n|  errors is specified, then the object must expose a data buffer\n|  that will be decoded using the given encoding and error handler.\n|  Otherwise, returns the result of object.str() (if defined)\n|  or repr(object).\n|  encoding defaults to sys.getdefaultencoding().\n|  errors defaults to 'strict'.\n|\n|  Methods defined here:\n|\n|  add(self, value, /)\n|      Return self+value.\n|\n|  contains(self, key, /)\n|      Return key in self.\n|\n|  eq(self, value, /)\n|      Return self==value.\n|\n|  format(self, formatspec, /)\n|      Return a formatted version of the string as described by formatspec.\n|\n|  ge(self, value, /)\n|      Return self>=value.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  getitem(self, key, /)\n|      Return self[key].\n|\n|  getnewargs(...)\n|\n|  gt(self, value, /)\n|      Return self>value.\n|\n|  hash(self, /)\n|      Return hash(self).\n|\n|  iter(self, /)\n|      Implement iter(self).\n|\n|  le(self, value, /)\n|      Return self<=value.\n|\n|  len(self, /)\n|      Return len(self).\n|\n|  lt(self, value, /)\n|      Return self<value.\n|\n|  mod(self, value, /)\n|      Return self%value.\n|\n|  mul(self, value, /)\n|      Return self*value.\n|\n|  ne(self, value, /)\n|      Return self!=value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  rmod(self, value, /)\n|      Return value%self.\n|\n|  rmul(self, value, /)\n|      Return value*self.\n|\n|  sizeof(self, /)\n|      Return the size of the string in memory, in bytes.\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  capitalize(self, /)\n|      Return a capitalized version of the string.\n|\n|      More specifically, make the first character have upper case and the rest lower\n|      case.\n|\n|  casefold(self, /)\n|      Return a version of the string suitable for caseless comparisons.\n|\n|  center(self, width, fillchar=' ', /)\n|      Return a centered string of length width.\n|\n|      Padding is done using the specified fill character (default is a space).\n|\n|  count(...)\n|      S.count(sub[, start[, end]]) -> int\n|\n|      Return the number of non-overlapping occurrences of substring sub in\n|      string S[start:end].  Optional arguments start and end are\n|      interpreted as in slice notation.\n|\n|  encode(self, /, encoding='utf-8', errors='strict')\n|      Encode the string using the codec registered for encoding.\n|\n|      encoding\n|        The encoding in which to encode the string.\n|      errors\n|        The error handling scheme to use for encoding errors.\n|        The default is 'strict' meaning that encoding errors raise a\n|        UnicodeEncodeError.  Other possible values are 'ignore', 'replace' and\n|        'xmlcharrefreplace' as well as any other name registered with\n|        codecs.registererror that can handle UnicodeEncodeErrors.\n|\n|  endswith(...)\n|      S.endswith(suffix[, start[, end]]) -> bool\n|\n|      Return True if S ends with the specified suffix, False otherwise.\n|      With optional start, test S beginning at that position.\n|      With optional end, stop comparing S at that position.\n|      suffix can also be a tuple of strings to try.\n|\n|  expandtabs(self, /, tabsize=8)\n|      Return a copy where all tab characters are expanded using spaces.\n|\n|      If tabsize is not given, a tab size of 8 characters is assumed.\n|\n|  find(...)\n|      S.find(sub[, start[, end]]) -> int\n|\n|      Return the lowest index in S where substring sub is found,\n|      such that sub is contained within S[start:end].  Optional\n|      arguments start and end are interpreted as in slice notation.\n|\n|      Return -1 on failure.\n|\n|  format(...)\n|      S.format(*args, kwargs) -> str\n|\n|      Return a formatted version of S, using substitutions from args and kwargs.\n|      The substitutions are identified by braces ('{' and '}').\n|\n|  formatmap(...)\n|      S.formatmap(mapping) -> str\n|\n|      Return a formatted version of S, using substitutions from mapping.\n|      The substitutions are identified by braces ('{' and '}').\n|\n|  index(...)\n|      S.index(sub[, start[, end]]) -> int\n|\n|      Return the lowest index in S where substring sub is found,\n|      such that sub is contained within S[start:end].  Optional\n|      arguments start and end are interpreted as in slice notation.\n|\n|      Raises ValueError when the substring is not found.\n|\n|  isalnum(self, /)\n|      Return True if the string is an alpha-numeric string, False otherwise.\n|\n|      A string is alpha-numeric if all characters in the string are alpha-numeric and\n|      there is at least one character in the string.\n|\n|  isalpha(self, /)\n|      Return True if the string is an alphabetic string, False otherwise.\n|\n|      A string is alphabetic if all characters in the string are alphabetic and there\n|      is at least one character in the string.\n|\n|  isascii(self, /)\n|      Return True if all characters in the string are ASCII, False otherwise.\n|\n|      ASCII characters have code points in the range U+0000-U+007F.\n|      Empty string is ASCII too.\n|\n|  isdecimal(self, /)\n|      Return True if the string is a decimal string, False otherwise.\n|\n|      A string is a decimal string if all characters in the string are decimal and\n|      there is at least one character in the string.\n|\n|  isdigit(self, /)\n|      Return True if the string is a digit string, False otherwise.\n|\n|      A string is a digit string if all characters in the string are digits and there\n|      is at least one character in the string.\n|\n|  isidentifier(self, /)\n|      Return True if the string is a valid Python identifier, False otherwise.\n|\n|      Call keyword.iskeyword(s) to test whether string s is a reserved identifier,\n|      such as \"def\" or \"class\".\n|\n|  islower(self, /)\n|      Return True if the string is a lowercase string, False otherwise.\n|\n|      A string is lowercase if all cased characters in the string are lowercase and\n|      there is at least one cased character in the string.\n|\n|  isnumeric(self, /)\n|      Return True if the string is a numeric string, False otherwise.\n|\n|      A string is numeric if all characters in the string are numeric and there is at\n|      least one character in the string.\n|\n|  isprintable(self, /)\n|      Return True if the string is printable, False otherwise.\n|\n|      A string is printable if all of its characters are considered printable in\n|      repr() or if it is empty.\n|\n|  isspace(self, /)\n|      Return True if the string is a whitespace string, False otherwise.\n|\n|      A string is whitespace if all characters in the string are whitespace and there\n|      is at least one character in the string.\n|\n|  istitle(self, /)\n|      Return True if the string is a title-cased string, False otherwise.\n|\n|      In a title-cased string, upper- and title-case characters may only\n|      follow uncased characters and lowercase characters only cased ones.\n|\n|  isupper(self, /)\n|      Return True if the string is an uppercase string, False otherwise.\n|\n|      A string is uppercase if all cased characters in the string are uppercase and\n|      there is at least one cased character in the string.\n|\n|  join(self, iterable, /)\n|      Concatenate any number of strings.\n|\n|      The string whose method is called is inserted in between each given string.\n|      The result is returned as a new string.\n|\n|      Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'\n|\n|  ljust(self, width, fillchar=' ', /)\n|      Return a left-justified string of length width.\n|\n|      Padding is done using the specified fill character (default is a space).\n|\n|  lower(self, /)\n|      Return a copy of the string converted to lowercase.\n|\n|  lstrip(self, chars=None, /)\n|      Return a copy of the string with leading whitespace removed.\n|\n|      If chars is given and not None, remove characters in chars instead.\n|\n|  partition(self, sep, /)\n|      Partition the string into three parts using the given separator.\n|\n|      This will search for the separator in the string.  If the separator is found,\n|      returns a 3-tuple containing the part before the separator, the separator\n|      itself, and the part after it.\n|\n|      If the separator is not found, returns a 3-tuple containing the original string\n|      and two empty strings.\n|\n|  removeprefix(self, prefix, /)\n|      Return a str with the given prefix string removed if present.\n|\n|      If the string starts with the prefix string, return string[len(prefix):].\n|      Otherwise, return a copy of the original string.\n|\n|  removesuffix(self, suffix, /)\n|      Return a str with the given suffix string removed if present.\n|\n|      If the string ends with the suffix string and that suffix is not empty,\n|      return string[:-len(suffix)]. Otherwise, return a copy of the original\n|      string.\n|\n|  replace(self, old, new, count=-1, /)\n|      Return a copy with all occurrences of substring old replaced by new.\n|\n|        count\n|          Maximum number of occurrences to replace.\n|          -1 (the default value) means replace all occurrences.\n|\n|      If the optional argument count is given, only the first count occurrences are\n|      replaced.\n|\n|  rfind(...)\n|      S.rfind(sub[, start[, end]]) -> int\n|\n|      Return the highest index in S where substring sub is found,\n|      such that sub is contained within S[start:end].  Optional\n|      arguments start and end are interpreted as in slice notation.\n|\n|      Return -1 on failure.\n|\n|  rindex(...)\n|      S.rindex(sub[, start[, end]]) -> int\n|\n|      Return the highest index in S where substring sub is found,\n|      such that sub is contained within S[start:end].  Optional\n|      arguments start and end are interpreted as in slice notation.\n|\n|      Raises ValueError when the substring is not found.\n|\n|  rjust(self, width, fillchar=' ', /)\n|      Return a right-justified string of length width.\n|\n|      Padding is done using the specified fill character (default is a space).\n|\n|  rpartition(self, sep, /)\n|      Partition the string into three parts using the given separator.\n|\n|      This will search for the separator in the string, starting at the end. If\n|      the separator is found, returns a 3-tuple containing the part before the\n|      separator, the separator itself, and the part after it.\n|\n|      If the separator is not found, returns a 3-tuple containing two empty strings\n|      and the original string.\n|\n|  rsplit(self, /, sep=None, maxsplit=-1)\n|      Return a list of the substrings in the string, using sep as the separator string.\n|\n|        sep\n|          The separator used to split the string.\n|\n|          When set to None (the default value), will split on any whitespace\n|          character (including \\\\n \\\\r \\\\t \\\\f and spaces) and will discard\n|          empty strings from the result.\n|        maxsplit\n|          Maximum number of splits (starting from the left).\n|          -1 (the default value) means no limit.\n|\n|      Splitting starts at the end of the string and works to the front.\n|\n|  rstrip(self, chars=None, /)\n|      Return a copy of the string with trailing whitespace removed.\n|\n|      If chars is given and not None, remove characters in chars instead.\n|\n|  split(self, /, sep=None, maxsplit=-1)\n|      Return a list of the substrings in the string, using sep as the separator string.\n|\n|        sep\n|          The separator used to split the string.\n|\n|          When set to None (the default value), will split on any whitespace\n|          character (including \\\\n \\\\r \\\\t \\\\f and spaces) and will discard\n|          empty strings from the result.\n|        maxsplit\n|          Maximum number of splits (starting from the left).\n|          -1 (the default value) means no limit.\n|\n|      Note, str.split() is mainly useful for data that has been intentionally\n|      delimited.  With natural text that includes punctuation, consider using\n|      the regular expression module.\n|\n|  splitlines(self, /, keepends=False)\n|      Return a list of the lines in the string, breaking at line boundaries.\n|\n|      Line breaks are not included in the resulting list unless keepends is given and\n|      true.\n|\n|  startswith(...)\n|      S.startswith(prefix[, start[, end]]) -> bool\n|\n|      Return True if S starts with the specified prefix, False otherwise.\n|      With optional start, test S beginning at that position.\n|      With optional end, stop comparing S at that position.\n|      prefix can also be a tuple of strings to try.\n|\n|  strip(self, chars=None, /)\n|      Return a copy of the string with leading and trailing whitespace removed.\n|\n|      If chars is given and not None, remove characters in chars instead.\n|\n|  swapcase(self, /)\n|      Convert uppercase characters to lowercase and lowercase characters to uppercase.\n|\n|  title(self, /)\n|      Return a version of the string where each word is titlecased.\n|\n|      More specifically, words start with uppercased characters and all remaining\n|      cased characters have lower case.\n|\n|  translate(self, table, /)\n|      Replace each character in the string using the given translation table.\n|\n|        table\n|          Translation table, which must be a mapping of Unicode ordinals to\n|          Unicode ordinals, strings, or None.\n|\n|      The table must implement lookup/indexing via getitem, for instance a\n|      dictionary or list.  If this operation raises LookupError, the character is\n|      left untouched.  Characters mapped to None are deleted.\n|\n|  upper(self, /)\n|      Return a copy of the string converted to uppercase.\n|\n|  zfill(self, width, /)\n|      Pad a numeric string with zeros on the left, to fill a field of the given width.\n|\n|      The string is never truncated.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  maketrans(...)\n|      Return a translation table usable for str.translate().\n|\n|      If there is only one argument, it must be a dictionary mapping Unicode\n|      ordinals (integers) or characters to Unicode ordinals, strings or None.\n|      Character keys will be then converted to ordinals.\n|      If there are two arguments, they must be strings of equal length, and\n|      in the resulting dictionary, each character in x will be mapped to the\n|      character at the same position in y. If there is a third argument, it\n|      must be a string, whose characters will be mapped to None in the result.\n"
                },
                {
                    "name": "class TextIO",
                    "content": "|  Typed version of the return of open() in text mode.\n|\n|  Method resolution order:\n|      TextIO\n|      IO\n|      Generic\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  enter(self) -> 'TextIO'\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties defined here:\n|\n|  buffer\n|\n|  encoding\n|\n|  errors\n|\n|  linebuffering\n|\n|  newlines\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  origbases = (typing.IO[str],)\n|\n|  parameters = ()\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from IO:\n|\n|  exit(self, type, value, traceback) -> None\n|\n|  close(self) -> None\n|\n|  fileno(self) -> int\n|\n|  flush(self) -> None\n|\n|  isatty(self) -> bool\n|\n|  read(self, n: int = -1) -> ~AnyStr\n|\n|  readable(self) -> bool\n|\n|  readline(self, limit: int = -1) -> ~AnyStr\n|\n|  readlines(self, hint: int = -1) -> List[~AnyStr]\n|\n|  seek(self, offset: int, whence: int = 0) -> int\n|\n|  seekable(self) -> bool\n|\n|  tell(self) -> int\n|\n|  truncate(self, size: int = None) -> int\n|\n|  writable(self) -> bool\n|\n|  write(self, s: ~AnyStr) -> int\n|\n|  writelines(self, lines: List[~AnyStr]) -> None\n|\n|  ----------------------------------------------------------------------\n|  Readonly properties inherited from IO:\n|\n|  closed\n|\n|  mode\n|\n|  name\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Generic:\n|\n|  classgetitem(params) from builtins.type\n|\n|  initsubclass(*args, kwargs) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n"
                },
                {
                    "name": "class TypeVar",
                    "content": "|  TypeVar(name, *constraints, bound=None, covariant=False, contravariant=False)\n|\n|  Type variable.\n|\n|  Usage::\n|\n|    T = TypeVar('T')  # Can be anything\n|    A = TypeVar('A', str, bytes)  # Must be str or bytes\n|\n|  Type variables exist primarily for the benefit of static type\n|  checkers.  They serve as the parameters for generic types as well\n|  as for generic function definitions.  See class Generic for more\n|  information on generic types.  Generic functions work as follows:\n|\n|    def repeat(x: T, n: int) -> List[T]:\n|        '''Return a list containing n references to x.'''\n|        return [x]*n\n|\n|    def longest(x: A, y: A) -> A:\n|        '''Return the longest of two strings.'''\n|        return x if len(x) >= len(y) else y\n|\n|  The latter example's signature is essentially the overloading\n|  of (str, str) -> str and (bytes, bytes) -> bytes.  Also note\n|  that if the arguments are instances of some subclass of str,\n|  the return type is still plain str.\n|\n|  At runtime, isinstance(x, T) and issubclass(C, T) will raise TypeError.\n|\n|  Type variables defined with covariant=True or contravariant=True\n|  can be used to declare covariant or contravariant generic types.\n|  See PEP 484 for more details. By default generic types are invariant\n|  in all type variables.\n|\n|  Type variables can be introspected. e.g.:\n|\n|    T.name == 'T'\n|    T.constraints == ()\n|    T.covariant == False\n|    T.contravariant = False\n|    A.constraints == (str, bytes)\n|\n|  Note that only type variables defined in global scope can be pickled.\n|\n|  Method resolution order:\n|      TypeVar\n|      Final\n|      Immutable\n|      TypeVarLike\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, name, *constraints, bound=None, covariant=False, contravariant=False)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  bound\n|\n|  constraints\n|\n|  contravariant\n|\n|  covariant\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from Final:\n|\n|  initsubclass(*args, kwds) from builtins.type\n|      This method is called when a class is subclassed.\n|\n|      The default implementation does nothing. It may be\n|      overridden to extend subclasses.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from Final:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from Immutable:\n|\n|  copy(self)\n|\n|  deepcopy(self, memo)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from TypeVarLike:\n|\n|  or(self, right)\n|      Return self|value.\n|\n|  reduce(self)\n|      Helper for pickle.\n|\n|  repr(self)\n|      Return repr(self).\n|\n|  ror(self, left)\n|      Return value|self.\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "NamedTuple(typename, fields=None, /, kwargs)\nTyped version of namedtuple.\n\nUsage in Python versions >= 3.6::\n\nclass Employee(NamedTuple):\nname: str\nid: int\n\nThis is equivalent to::\n\nEmployee = collections.namedtuple('Employee', ['name', 'id'])\n\nThe resulting class has an extra annotations attribute, giving a\ndict that maps field names to types.  (The field names are also in\nthe fields attribute, which is part of the namedtuple API.)\nAlternative equivalent keyword syntax is also accepted::\n\nEmployee = NamedTuple('Employee', name=str, id=int)\n\nIn Python versions <= 3.5 use::\n\nEmployee = NamedTuple('Employee', [('name', str), ('id', int)])\n\nTypedDict(typename, fields=None, /, *, total=True, kwargs)\nA simple typed namespace. At runtime it is equivalent to a plain dict.\n\nTypedDict creates a dictionary type that expects all of its\ninstances to have a certain set of keys, where each key is\nassociated with a value of a consistent type. This expectation\nis not checked at runtime but is only enforced by type checkers.\nUsage::\n\nclass Point2D(TypedDict):\nx: int\ny: int\nlabel: str\n\na: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK\nb: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check\n\nassert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')\n\nThe type info can be accessed via the Point2D.annotations dict, and\nthe Point2D.requiredkeys and Point2D.optionalkeys frozensets.\nTypedDict supports two additional equivalent forms::\n\nPoint2D = TypedDict('Point2D', x=int, y=int, label=str)\nPoint2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})\n\nBy default, all keys must be present in a TypedDict. It is possible\nto override this by specifying totality.\nUsage::\n\nclass point2D(TypedDict, total=False):\nx: int\ny: int\n\nThis means that a point2D TypedDict can have any of the keys omitted.A type\nchecker is only expected to support a literal False or True as the value of\nthe total argument. True is the default, and makes all items defined in the\nclass body be required.\n\nThe class syntax is only supported in Python 3.6+, while two other\nsyntax forms work for Python 2.7 and 3.2+\n",
            "subsections": [
                {
                    "name": "cast",
                    "content": "Cast a value to a type.\n\nThis returns the value unchanged.  To the type checker this\nsignals that the return value has the designated type, but at\nruntime we intentionally don't check anything (we want this\nto be as fast as possible).\n"
                },
                {
                    "name": "final",
                    "content": "A decorator to indicate final methods and final classes.\n\nUse this decorator to indicate to type checkers that the decorated\nmethod cannot be overridden, and decorated class cannot be subclassed.\nFor example:\n\nclass Base:\n@final\ndef done(self) -> None:\n...\nclass Sub(Base):\ndef done(self) -> None:  # Error reported by type checker\n...\n\n@final\nclass Leaf:\n...\nclass Other(Leaf):  # Error reported by type checker\n...\n\nThere is no runtime checking of these properties.\n"
                },
                {
                    "name": "get_args",
                    "content": "Get type arguments with all substitutions performed.\n\nFor unions, basic simplifications used by Union constructor are performed.\nExamples::\ngetargs(Dict[str, int]) == (str, int)\ngetargs(int) == ()\ngetargs(Union[int, Union[T, int], str][int]) == (int, str)\ngetargs(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int])\ngetargs(Callable[[], T][int]) == ([], int)\n"
                },
                {
                    "name": "get_origin",
                    "content": "Get the unsubscripted version of a type.\n\nThis supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar\nand Annotated. Return None for unsupported types. Examples::\n\ngetorigin(Literal[42]) is Literal\ngetorigin(int) is None\ngetorigin(ClassVar[int]) is ClassVar\ngetorigin(Generic) is Generic\ngetorigin(Generic[T]) is Generic\ngetorigin(Union[T, int]) is Union\ngetorigin(List[Tuple[T, T]][int]) == list\ngetorigin(P.args) is P\n"
                },
                {
                    "name": "get_type_hints",
                    "content": "Return type hints for an object.\n\nThis is often the same as obj.annotations, but it handles\nforward references encoded as string literals, adds Optional[t] if a\ndefault value equal to None is set and recursively replaces all\n'Annotated[T, ...]' with 'T' (unless 'includeextras=True').\n\nThe argument may be a module, class, method, or function. The annotations\nare returned as a dictionary. For classes, annotations include also\ninherited members.\n\nTypeError is raised if the argument is not of a type that can contain\nannotations, and an empty dictionary is returned if no annotations are\npresent.\n\nBEWARE -- the behavior of globalns and localns is counterintuitive\n(unless you are familiar with how eval() and exec() work).  The\nsearch order is locals first, then globals.\n\n- If no dict arguments are passed, an attempt is made to use the\nglobals from obj (or the respective module's globals for classes),\nand these are also used as the locals.  If the object does not appear\nto have globals, an empty dictionary is used.  For classes, the search\norder is globals first then locals.\n\n- If one dict argument is passed, it is used for both globals and\nlocals.\n\n- If two dict arguments are passed, they specify globals and\nlocals, respectively.\n"
                },
                {
                    "name": "is_typeddict",
                    "content": "Check if an annotation is a TypedDict class\n\nFor example::\nclass Film(TypedDict):\ntitle: str\nyear: int\n\nistypeddict(Film)  # => True\nistypeddict(Union[list, str])  # => False\n"
                },
                {
                    "name": "no_type_check",
                    "content": "Decorator to indicate that annotations are not type hints.\n\nThe argument must be a class or function; if it is a class, it\napplies recursively to all methods and classes defined in that class\n(but not to methods defined in its superclasses or subclasses).\n\nThis mutates the function(s) or class(es) in place.\n"
                },
                {
                    "name": "no_type_check_decorator",
                    "content": "Decorator to give another decorator the @notypecheck effect.\n\nThis wraps the decorator with something that wraps the decorated\nfunction in @notypecheck.\n"
                },
                {
                    "name": "overload",
                    "content": "Decorator for overloaded functions/methods.\n\nIn a stub file, place two or more stub definitions for the same\nfunction in a row, each decorated with @overload.  For example:\n\n@overload\ndef utf8(value: None) -> None: ...\n@overload\ndef utf8(value: bytes) -> bytes: ...\n@overload\ndef utf8(value: str) -> bytes: ...\n\nIn a non-stub file (i.e. a regular .py file), do the same but\nfollow it with an implementation.  The implementation should *not*\nbe decorated with @overload.  For example:\n\n@overload\ndef utf8(value: None) -> None: ...\n@overload\ndef utf8(value: bytes) -> bytes: ...\n@overload\ndef utf8(value: str) -> bytes: ...\ndef utf8(value):\n# implementation goes here\n"
                },
                {
                    "name": "runtime_checkable",
                    "content": "Mark a protocol class as a runtime protocol.\n\nSuch protocol can be used with isinstance() and issubclass().\nRaise TypeError if applied to a non-protocol class.\nThis allows a simple-minded structural check very similar to\none trick ponies in collections.abc such as Iterable.\nFor example::\n\n@runtimecheckable\nclass Closable(Protocol):\ndef close(self): ...\n\nassert isinstance(open('/some/file'), Closable)\n\nWarning: this will check only the presence of the required methods,\nnot their type signatures!\n"
                }
            ]
        },
        "DATA": {
            "content": "AbstractSet = typing.AbstractSet\nA generic version of collections.abc.Set.\n\nAny = typing.Any\nSpecial type indicating an unconstrained type.\n\n- Any is compatible with every type.\n- Any assumed to have all methods.\n- All values assumed to be instances of Any.\n\nNote that all the above statements are true from the point of view of\nstatic type checkers. At runtime, Any should not be used with instance\nor class checks.\n\nAnyStr = ~AnyStr\nAsyncContextManager = typing.AsyncContextManager\nA generic version of contextlib.AbstractAsyncContextManager.\n\nAsyncGenerator = typing.AsyncGenerator\nA generic version of collections.abc.AsyncGenerator.\n\nAsyncIterable = typing.AsyncIterable\nA generic version of collections.abc.AsyncIterable.\n\nAsyncIterator = typing.AsyncIterator\nA generic version of collections.abc.AsyncIterator.\n\nAwaitable = typing.Awaitable\nA generic version of collections.abc.Awaitable.\n\nByteString = typing.ByteString\nA generic version of collections.abc.ByteString.\n\nCallable = typing.Callable\nCallable type; Callable[[int], str] is a function of (int) -> str.\n\nThe subscription syntax must always be used with exactly two\nvalues: the argument list and the return type.  The argument list\nmust be a list of types or ellipsis; the return type must be a single type.\n\nThere is no syntax to indicate optional or keyword arguments,\nsuch function types are rarely used as callback types.\n\nChainMap = typing.ChainMap\nA generic version of collections.ChainMap.\n\nClassVar = typing.ClassVar\nSpecial type construct to mark class variables.\n\nAn annotation wrapped in ClassVar indicates that a given\nattribute is intended to be used as a class variable and\nshould not be set on instances of that class. Usage::\n\nclass Starship:\nstats: ClassVar[Dict[str, int]] = {} # class variable\ndamage: int = 10                     # instance variable\n\nClassVar accepts only types and cannot be further subscribed.\n\nNote that ClassVar is not a class itself, and should not\nbe used with isinstance() or issubclass().\n\nCollection = typing.Collection\nA generic version of collections.abc.Collection.\n\nConcatenate = typing.Concatenate\nUsed in conjunction with ``ParamSpec`` and ``Callable`` to represent a\nhigher order function which adds, removes or transforms parameters of a\ncallable.\n\nFor example::\n\nCallable[Concatenate[int, P], int]\n\nSee PEP 612 for detailed information.\n\nContainer = typing.Container\nA generic version of collections.abc.Container.\n\nContextManager = typing.ContextManager\nA generic version of contextlib.AbstractContextManager.\n\nCoroutine = typing.Coroutine\nA generic version of collections.abc.Coroutine.\n\nCounter = typing.Counter\nA generic version of collections.Counter.\n\nDefaultDict = typing.DefaultDict\nA generic version of collections.defaultdict.\n\nDeque = typing.Deque\nA generic version of collections.deque.\n\nDict = typing.Dict\nA generic version of dict.\n\nFinal = typing.Final\nSpecial typing construct to indicate final names to type checkers.\n\nA final name cannot be re-assigned or overridden in a subclass.\nFor example:\n\nMAXSIZE: Final = 9000\nMAXSIZE += 1  # Error reported by type checker\n\nclass Connection:\nTIMEOUT: Final[int] = 10\n\nclass FastConnector(Connection):\nTIMEOUT = 1  # Error reported by type checker\n\nThere is no runtime checking of these properties.\n\nFrozenSet = typing.FrozenSet\nA generic version of frozenset.\n\nGenerator = typing.Generator\nA generic version of collections.abc.Generator.\n\nHashable = typing.Hashable\nA generic version of collections.abc.Hashable.\n\nItemsView = typing.ItemsView\nA generic version of collections.abc.ItemsView.\n\nIterable = typing.Iterable\nA generic version of collections.abc.Iterable.\n\nIterator = typing.Iterator\nA generic version of collections.abc.Iterator.\n\nKeysView = typing.KeysView\nA generic version of collections.abc.KeysView.\n\nList = typing.List\nA generic version of list.\n\nLiteral = typing.Literal\nSpecial typing form to define literal types (a.k.a. value types).\n\nThis form can be used to indicate to type checkers that the corresponding\nvariable or function parameter has a value equivalent to the provided\nliteral (or one of several literals):\n\ndef validatesimple(data: Any) -> Literal[True]:  # always returns True\n...\n\nMODE = Literal['r', 'rb', 'w', 'wb']\ndef openhelper(file: str, mode: MODE) -> str:\n...\n\nopenhelper('/some/path', 'r')  # Passes type check\nopenhelper('/other/path', 'typo')  # Error in type checker\n\nLiteral[...] cannot be subclassed. At runtime, an arbitrary value\nis allowed as type argument to Literal[...], but type checkers may\nimpose restrictions.\n\nMapping = typing.Mapping\nA generic version of collections.abc.Mapping.\n\nMappingView = typing.MappingView\nA generic version of collections.abc.MappingView.\n\nMatch = typing.Match\nA generic version of re.Match.\n\nMutableMapping = typing.MutableMapping\nA generic version of collections.abc.MutableMapping.\n\nMutableSequence = typing.MutableSequence\nA generic version of collections.abc.MutableSequence.\n\nMutableSet = typing.MutableSet\nA generic version of collections.abc.MutableSet.\n\nNoReturn = typing.NoReturn\nSpecial type indicating functions that never return.\nExample::\n\nfrom typing import NoReturn\n\ndef stop() -> NoReturn:\nraise Exception('no way')\n\nThis type is invalid in other positions, e.g., ``List[NoReturn]``\nwill fail in static type checkers.\n\nOptional = typing.Optional\nOptional type.\n\nOptional[X] is equivalent to Union[X, None].\n\nOrderedDict = typing.OrderedDict\nA generic version of collections.OrderedDict.\n\nPattern = typing.Pattern\nA generic version of re.Pattern.\n\nReversible = typing.Reversible\nA generic version of collections.abc.Reversible.\n\nSequence = typing.Sequence\nA generic version of collections.abc.Sequence.\n\nSet = typing.Set\nA generic version of set.\n\nSized = typing.Sized\nA generic version of collections.abc.Sized.\n\nTYPECHECKING = False\nTuple = typing.Tuple\nTuple type; Tuple[X, Y] is the cross-product type of X and Y.\n\nExample: Tuple[T1, T2] is a tuple of two elements corresponding\nto type variables T1 and T2.  Tuple[int, float, str] is a tuple\nof an int, a float and a string.\n\nTo specify a variable-length tuple of homogeneous type, use Tuple[T, ...].\n\nType = typing.Type\nA special construct usable to annotate class objects.\n\nFor example, suppose we have the following classes::\n\nclass User: ...  # Abstract base for User classes\nclass BasicUser(User): ...\nclass ProUser(User): ...\nclass TeamUser(User): ...\n\nAnd a function that takes a class argument that's a subclass of\nUser and returns an instance of the corresponding class::\n\nU = TypeVar('U', bound=User)\ndef newuser(userclass: Type[U]) -> U:\nuser = userclass()\n# (Here we could write the user object to a database)\nreturn user\n\njoe = newuser(BasicUser)\n\nAt this point the type checker knows that joe has type BasicUser.\n\nTypeAlias = typing.TypeAlias\nSpecial marker indicating that an assignment should\nbe recognized as a proper type alias definition by type\ncheckers.\n\nFor example::\n\nPredicate: TypeAlias = Callable[..., bool]\n\nIt's invalid when used anywhere except as in the example above.\n\nTypeGuard = typing.TypeGuard\nSpecial typing form used to annotate the return type of a user-defined\ntype guard function.  ``TypeGuard`` only accepts a single type argument.\nAt runtime, functions marked this way should return a boolean.\n\n``TypeGuard`` aims to benefit *type narrowing* -- a technique used by static\ntype checkers to determine a more precise type of an expression within a\nprogram's code flow.  Usually type narrowing is done by analyzing\nconditional code flow and applying the narrowing to a block of code.  The\nconditional expression here is sometimes referred to as a \"type guard\".\n\nSometimes it would be convenient to use a user-defined boolean function\nas a type guard.  Such a function should use ``TypeGuard[...]`` as its\nreturn type to alert static type checkers to this intention.\n\nUsing  ``-> TypeGuard`` tells the static type checker that for a given\nfunction:\n\n1. The return value is a boolean.\n2. If the return value is ``True``, the type of its argument\nis the type inside ``TypeGuard``.\n\nFor example::\n\ndef isstr(val: Union[str, float]):\n# \"isinstance\" type guard\nif isinstance(val, str):\n# Type of ``val`` is narrowed to ``str``\n...\nelse:\n# Else, type of ``val`` is narrowed to ``float``.\n...\n\nStrict type narrowing is not enforced -- ``TypeB`` need not be a narrower\nform of ``TypeA`` (it can even be a wider form) and this may lead to\ntype-unsafe results.  The main reason is to allow for things like\nnarrowing ``List[object]`` to ``List[str]`` even though the latter is not\na subtype of the former, since ``List`` is invariant.  The responsibility of\nwriting type-safe type guards is left to the user.\n\n``TypeGuard`` also works with type variables.  For more information, see\nPEP 647 (User-Defined Type Guards).\n\nUnion = typing.Union\nUnion type; Union[X, Y] means either X or Y.\n\nTo define a union, use e.g. Union[int, str].  Details:\n- The arguments must be types and there must be at least one.\n- None as an argument is a special case and is replaced by\ntype(None).\n- Unions of unions are flattened, e.g.::\n\nUnion[Union[int, str], float] == Union[int, str, float]\n\n- Unions of a single argument vanish, e.g.::\n\nUnion[int] == int  # The constructor actually returns int\n\n- Redundant arguments are skipped, e.g.::\n\nUnion[int, str, int] == Union[int, str]\n\n- When comparing unions, the argument order is ignored, e.g.::\n\nUnion[int, str] == Union[str, int]\n\n- You cannot subclass or instantiate a union.\n- You can use Optional[X] as a shorthand for Union[X, None].\n\nValuesView = typing.ValuesView\nA generic version of collections.abc.ValuesView.\n\nall = ['Annotated', 'Any', 'Callable', 'ClassVar', 'Concatenate', ...\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/typing.py\n\n",
            "subsections": []
        }
    },
    "summary": "typing - The typing module: Support for gradual typing as defined by PEP 484.",
    "flags": [],
    "examples": [],
    "see_also": []
}