{
    "mode": "pydoc",
    "parameter": "abc",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/abc/json",
    "generated": "2026-06-02T14:17:05Z",
    "sections": {
        "NAME": {
            "content": "abc - Abstract Base Classes (ABCs) according to PEP 3119.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/abc.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": []
        },
        "CLASSES": {
            "content": "builtins.classmethod(builtins.object)\nabstractclassmethod\nbuiltins.object\nABC\nbuiltins.property(builtins.object)\nabstractproperty\nbuiltins.staticmethod(builtins.object)\nabstractstaticmethod\nbuiltins.type(builtins.object)\nABCMeta\n",
            "subsections": [
                {
                    "name": "class ABC",
                    "content": "|  Helper class that provides a standard way to create an ABC using\n|  inheritance.\n|\n|  Data and other attributes defined here:\n|\n|  abstractmethods = frozenset()\n"
                },
                {
                    "name": "class ABCMeta",
                    "content": "|  ABCMeta(name, bases, namespace, kwargs)\n|\n|  Metaclass for defining Abstract Base Classes (ABCs).\n|\n|  Use this metaclass to create an ABC.  An ABC can be subclassed\n|  directly, and then acts as a mix-in class.  You can also register\n|  unrelated concrete classes (even built-in classes) and unrelated\n|  ABCs as 'virtual subclasses' -- these and their descendants will\n|  be considered subclasses of the registering ABC by the built-in\n|  issubclass() function, but the registering ABC won't show up in\n|  their MRO (Method Resolution Order) nor will method\n|  implementations defined by the registering ABC be callable (not\n|  even via super()).\n|\n|  Method resolution order:\n|      ABCMeta\n|      builtins.type\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  instancecheck(cls, instance)\n|      Override for isinstance(instance, cls).\n|\n|  subclasscheck(cls, subclass)\n|      Override for issubclass(subclass, cls).\n|\n|  register(cls, subclass)\n|      Register a virtual subclass of an ABC.\n|\n|      Returns the subclass, to allow usage as a class decorator.\n|\n|  ----------------------------------------------------------------------\n|  Static methods defined here:\n|\n|  new(mcls, name, bases, namespace, kwargs)\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {}\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.type:\n|\n|  call(self, /, *args, kwargs)\n|      Call self as a function.\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  dir(self, /)\n|      Specialized dir implementation for types.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  or(self, value, /)\n|      Return self|value.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ror(self, value, /)\n|      Return value|self.\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  sizeof(self, /)\n|      Return memory consumption of the type object.\n|\n|  subclasses(self, /)\n|      Return a list of immediate subclasses.\n|\n|  mro(self, /)\n|      Return a type's method resolution order.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from builtins.type:\n|\n|  prepare(...) from builtins.type\n|      prepare() -> dict\n|      used to create the namespace for the class statement\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.type:\n|\n|  abstractmethods\n|\n|  dict\n|\n|  textsignature\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes inherited from builtins.type:\n|\n|  base = <class 'type'>\n|      type(object) -> the object's type\n|      type(name, bases, dict, kwds) -> a new type\n|\n|\n|  bases = (<class 'type'>,)\n|\n|  basicsize = 888\n|\n|  dictoffset = 264\n|\n|  flags = 2148029952\n|\n|  itemsize = 40\n|\n|  mro = (<class 'abc.ABCMeta'>, <class 'type'>, <class 'object'>)\n|\n|  weakrefoffset = 368\n"
                },
                {
                    "name": "class abstractclassmethod",
                    "content": "|  A decorator indicating abstract classmethods.\n|\n|  Deprecated, use 'classmethod' with 'abstractmethod' instead:\n|\n|      class C(ABC):\n|          @classmethod\n|          @abstractmethod\n|          def myabstractclassmethod(cls, ...):\n|              ...\n|\n|  Method resolution order:\n|      abstractclassmethod\n|      builtins.classmethod\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, callable)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  isabstractmethod = True\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.classmethod:\n|\n|  get(self, instance, owner=None, /)\n|      Return an attribute of instance, which is of type owner.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.classmethod:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.classmethod:\n|\n|  dict\n|\n|  func\n|\n|  wrapped\n"
                },
                {
                    "name": "class abstractproperty",
                    "content": "|  abstractproperty(fget=None, fset=None, fdel=None, doc=None)\n|\n|  A decorator indicating abstract properties.\n|\n|  Deprecated, use 'property' with 'abstractmethod' instead:\n|\n|      class C(ABC):\n|          @property\n|          @abstractmethod\n|          def myabstractproperty(self):\n|              ...\n|\n|  Method resolution order:\n|      abstractproperty\n|      builtins.property\n|      builtins.object\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|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  isabstractmethod = True\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.property:\n|\n|  delete(self, instance, /)\n|      Delete an attribute of instance.\n|\n|  get(self, instance, owner=None, /)\n|      Return an attribute of instance, which is of type owner.\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  init(self, /, *args, kwargs)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  set(self, instance, value, /)\n|      Set an attribute of instance to value.\n|\n|  setname(...)\n|      Method to set name of a property.\n|\n|  deleter(...)\n|      Descriptor to obtain a copy of the property with a different deleter.\n|\n|  getter(...)\n|      Descriptor to obtain a copy of the property with a different getter.\n|\n|  setter(...)\n|      Descriptor to obtain a copy of the property with a different setter.\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.property:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.property:\n|\n|  fdel\n|\n|  fget\n|\n|  fset\n"
                },
                {
                    "name": "class abstractstaticmethod",
                    "content": "|  A decorator indicating abstract staticmethods.\n|\n|  Deprecated, use 'staticmethod' with 'abstractmethod' instead:\n|\n|      class C(ABC):\n|          @staticmethod\n|          @abstractmethod\n|          def myabstractstaticmethod(...):\n|              ...\n|\n|  Method resolution order:\n|      abstractstaticmethod\n|      builtins.staticmethod\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, callable)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  isabstractmethod = True\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.staticmethod:\n|\n|  call(self, /, *args, kwargs)\n|      Call self as a function.\n|\n|  get(self, instance, owner=None, /)\n|      Return an attribute of instance, which is of type owner.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.staticmethod:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.staticmethod:\n|\n|  dict\n|\n|  func\n|\n|  wrapped\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "abstractmethod",
                    "content": "A decorator indicating abstract methods.\n\nRequires that the metaclass is ABCMeta or derived from it.  A\nclass that has a metaclass derived from ABCMeta cannot be\ninstantiated unless all of its abstract methods are overridden.\nThe abstract methods can be called using any of the normal\n'super' call mechanisms.  abstractmethod() may be used to declare\nabstract methods for properties and descriptors.\n\nUsage:\n\nclass C(metaclass=ABCMeta):\n@abstractmethod\ndef myabstractmethod(self, ...):\n...\n"
                },
                {
                    "name": "get_cache_token",
                    "content": "Returns the current ABC cache token.\n\nThe token is an opaque object (supporting equality testing) identifying the\ncurrent version of the ABC cache for virtual subclasses. The token changes\nwith every call to register() on any ABC.\n"
                },
                {
                    "name": "update_abstractmethods",
                    "content": "Recalculate the set of abstract methods of an abstract class.\n\nIf a class has had one of its abstract methods implemented after the\nclass was created, the method will not be considered implemented until\nthis function is called. Alternatively, if a new abstract method has been\nadded to the class, it will only be considered an abstract method of the\nclass after this function is called.\n\nThis function should be called before any use is made of the class,\nusually in class decorators that add methods to the subject class.\n\nReturns cls, to allow usage as a class decorator.\n\nIf cls is not an instance of ABCMeta, does nothing.\n"
                }
            ]
        },
        "FILE": {
            "content": "/usr/lib/python3.10/abc.py\n\n",
            "subsections": []
        }
    },
    "summary": "abc - Abstract Base Classes (ABCs) according to PEP 3119.",
    "flags": [],
    "examples": [],
    "see_also": []
}