[docs] Confusion over NotImplemented constant

Mark Summerfield list at qtrac.plus.com
Thu Nov 1 15:47:40 CET 2012


Hi,

On this page

http://docs.python.org/3/library/constants.html?highlight=notimplemented#NotImplemented

It says that NotImplemented should be returned by rich comparison
special methods.

But it doesn't mention using it with the abc module. Yet on this page

http://docs.python.org/3/library/abc.html#module-abc

It says that __subclasshook__() methods should return NotImplemented.

However, on this page

http://docs.python.org/3/library/exceptions.html?highlight=notimplemented#NotImplementedError

It says that abstract methods should raise NotImplementedError.

Maybe someone could unify the coverage of NotImplemented and
NotImplementedError and explain when to use one and when to use the
other?

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Programming in Go" - ISBN 0321774639
            http://www.qtrac.eu/gobook.html


More information about the docs mailing list