[Python-ideas] Adding collections.abc.Ordered

Ben Finney ben+python at benfinney.id.au
Sat Dec 26 18:23:50 EST 2015


Guido van Rossum <guido at python.org> writes:

> There is a precedent for declaring that a method isn't implemented:
> __hash__. The convention is to set it to None in the subclass that
> explicitly doesn't want to implement it.

Isn't ‘raise NotImplementedError’ the more explicit convention provided
by Python (as a built-in, explicitly-named exception!) for communicating
this meaning?

-- 
 \        “[It's] best to confuse only one issue at a time.” —Brian W. |
  `\  Kernighan, Dennis M. Ritchie, _The C programming language_, 1988 |
_o__)                                                                  |
Ben Finney



More information about the Python-ideas mailing list