[issue46814] Documentation for constructing abstract base classes is misleading

Guido van Rossum report at bugs.python.org
Mon Feb 28 11:58:45 EST 2022


Guido van Rossum <guido at python.org> added the comment:

Raymond, I agree that this is going too far. I believe the OP has taken the position that "abstract" has only one meaning and it is defined by inspect.isabstract(). I disagree with this.

An ABC is an ABC is an ABC, and it provides certain functionality through the ABCMeta metaclass: (1) forbid instantiation when at least one @abstractmethod-decorated method exist that isn't overridden, and (2) virtual subclasses.

Calling out that a class with metaclass=ABCMeta is only abstract when it has at least one @abstractmethod left, over and over, is not helpful.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46814>
_______________________________________


More information about the Python-bugs-list mailing list