[New-bugs-announce] [issue39111] Misleading documentation

Murali Ganapathy report at bugs.python.org
Fri Dec 20 11:42:56 EST 2019


New submission from Murali Ganapathy <murali at google.com>:

The documentation at https://docs.python.org/3.6/library/constants.html#NotImplemented states

If all attempts return NotImplemented, the interpreter will raise an appropriate exception. However this is not true for __eq__.

===
class Foo:
  def __eq__(self, other):
    return NotImplemented

Foo() == Foo() # returns False, does not throw an exception
====

----------
assignee: docs at python
components: Documentation
messages: 358719
nosy: docs at python, murali
priority: normal
severity: normal
status: open
title: Misleading documentation
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39111>
_______________________________________


More information about the New-bugs-announce mailing list