[issue34338] abstractmethod can run on classes
Nikolas Vanderhoof
report at bugs.python.org
Tue Aug 7 20:29:59 EDT 2018
Nikolas Vanderhoof <nikolasrvanderhoof at gmail.com> added the comment:
This behavior is consistent with the behavior described in the documentation for `@classmethod`.
https://docs.python.org/3.6/library/functions.html?highlight=classmethod#classmethod
"It can be called either on the class (such as C.f()) or on an instance (such as C().f())."
In this case, it can't be called on an instance because it is abstract, but since it's a classmethod, it is still okay to call it on the class directly.
----------
nosy: +nikvanderhoof
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34338>
_______________________________________
More information about the Python-bugs-list
mailing list