-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Open
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
In the documentation for NotImplementedError
, we see the following:
cpython/Doc/library/exceptions.rst
Lines 299 to 304 in a7715cc
.. exception:: NotImplementedError | |
This exception is derived from :exc:`RuntimeError`. In user defined base | |
classes, abstract methods should raise this exception when they require | |
derived classes to override the method, or while the class is being | |
developed to indicate that the real implementation still needs to be added. |
If "abstract base classes" are meant to mean ABCs from the standard library, this is unnecessary as the ABC metaclass will prohibit instantiation of any derived class that doesn't implement an abstract method. Indeed, adding a raise
would be dead code that would flaunt, say, coverage metrics.
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir