[docs] Clarify the use cases of NotImplemented in the docs (issue 27242)

jelle.zijlstra at gmail.com jelle.zijlstra at gmail.com
Tue Jun 7 00:52:08 EDT 2016

A few minor comments, looks good overall.

Also confirmed that the docs build correctly with this patch.

File Doc/library/exceptions.rst (right):

Doc/library/exceptions.rst:241: an operation is :exc:`TypeError`.
I'm not sure that is necessarily accurate. For example, maybe you only
support some operation on integers smaller than some threshold, and
raise ValueError if the integer is too big.

islice() did this in Python 2:

>>> islice([], 100000000000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Stop argument for islice() must be None or an integer: 0 <=
x <= maxint.

Doc/library/exceptions.rst:243: The purposes of :data:`NotImplemented`
and of this exception tend to be mixed,
"confused" sounds better than "mixed" here


More information about the docs mailing list