[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.


http://bugs.python.org/review/27242/diff/17554/Doc/library/exceptions.rst
File Doc/library/exceptions.rst (right):

http://bugs.python.org/review/27242/diff/17554/Doc/library/exceptions.rst#newcode241
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.

http://bugs.python.org/review/27242/diff/17554/Doc/library/exceptions.rst#newcode243
Doc/library/exceptions.rst:243: The purposes of :data:`NotImplemented`
and of this exception tend to be mixed,
"confused" sounds better than "mixed" here

http://bugs.python.org/review/27242/


More information about the docs mailing list