pydoc > _py_abc

📛 NAME

_py_abc

🚀 Quick Reference

Use CaseCommandDescription
Define an ABCclass MyABC(metaclass=ABCMeta):Create an abstract base class using ABCMeta metaclass
Register a virtual subclassMyABC.register(SomeClass)Register a class as virtual subclass of the ABC
Check instanceisinstance(obj, MyABC)Check if object is instance of ABC (including virtual subclasses)
Check subclassissubclass(SomeClass, MyABC)Check if class is subclass of ABC (including virtual subclasses)
Get cache tokenget_cache_token()Get current ABC cache token

📚 MODULE REFERENCE

https://docs.python.org/3.10/library/_py_abc.html

The following documentation is automatically generated from the Python source files. It may be incomplete, incorrect or include features that are considered implementation detail and may vary between Python implementations. When in doubt, consult the module reference at the location listed above.

📦 CLASSES

builtins.type(builtins.object)

ABCMeta

class ABCMeta(builtins.type)

Metaclass for defining Abstract Base Classes (ABCs).

Use this metaclass to create an ABC. An ABC can be subclassed directly, and then acts as a mix-in class. You can also register unrelated concrete classes (even built-in classes) and unrelated ABCs as 'virtual subclasses' -- these and their descendants will be considered subclasses of the registering ABC by the built-in issubclass() function, but the registering ABC won't show up in their MRO (Method Resolution Order) nor will method implementations defined by the registering ABC be callable (not even via super()).

Method resolution order:

Methods defined here

Static methods defined here

Data and other attributes defined here

Methods inherited from builtins.type

Class methods inherited from builtins.type

Data descriptors inherited from builtins.type

Data and other attributes inherited from builtins.type

⚙️ FUNCTIONS

get_cache_token()

Returns the current ABC cache token.

The token is an opaque object (supporting equality testing) identifying the current version of the ABC cache for virtual subclasses. The token changes with every call to register() on any ABC.

📁 FILE

/usr/lib/python3.10/_py_abc.py

_py_abc
📛 NAME 🚀 Quick Reference 📚 MODULE REFERENCE 📦 CLASSES
class ABCMeta(builtins.type) Methods defined here Static methods defined here Data and other attributes defined here Methods inherited from builtins.type Class methods inherited from builtins.type Data descriptors inherited from builtins.type Data and other attributes inherited from builtins.type
⚙️ FUNCTIONS
get_cache_token()
📁 FILE

Generated by phpman v4.10.0-7-g98e9fd5 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-09-01 15:50 @216.73.216.239
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^