abc.abstractclassmethod
Prev: abc.ABCMeta | Up: abc | Next: abc.abstractmethod
Rel: abc.ABC, abc.ABCMeta, abc.abstractmethod, abc.abstractproperty
Ref: docs.python.org — abc.abstractclassmethod
Tags: #public #python3 #stdlib #abc
Import
import abc
from abc import abstractclassmethod
Signature & Overview
abc.abstractclassmethod(callable)
A decorator indicating abstract classmethods.
Usage
from abc import ABC, abstractmethod
# Deprecated: stack @classmethod above @abstractmethod instead
class Base(ABC):
@classmethod
@abstractmethod
def create(cls): ...
Gotchas
- Deprecated since Python 3.3: Always write
@classmethodon top of@abstractmethod.
REPL Inspect
from abc import abstractclassmethod
help(abstractclassmethod)
Linked from
- tuts/python3/stdlib_module/abc
- tuts/python3/stdlib_module/abc/ABC
- tuts/python3/stdlib_module/abc/ABCMeta
- tuts/python3/stdlib_module/abc/abstractmethod
- tuts/python3/stdlib_module/abc/abstractproperty
- tuts/python3/stdlib_module/abc/abstractstaticmethod
- tuts/python3/stdlib_module/abc/get_cache_token
- tuts/python3/stdlib_module/abc/update_abstractmethods
Related notes
- tuts/python3/stdlib_module/abc/ABC Linked here; links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc/ABCMeta Linked here; links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc/abstractmethod Linked here; links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc/abstractproperty Linked here; links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc/abstractstaticmethod links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc/get_cache_token links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc/update_abstractmethods links to this page; shared tags: #abc, #stdlib
- tuts/python3/stdlib_module/abc links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib