Are there any experts on the use of ABCs and abstractmethod who could weigh in on a documentation issue please?
The documentation for the exception says that abstract methods should raise NotImplementedError. Obviously this is not mandatory. Abstract methods can have default implementations. But for those that don’t, the docs currently suggest raising.
Should we remove that recommendation? Or should we also mention that recommendation to the docs for abstractmethod itself?
An “abstract class” is normally made with ABC and abstractmethod in
modern Python. But the generic notion of an abstract class does not
require these, and without them NotImplementedError is a sensible way
to express that a method still needs implementation.