[docs] Document auto __ne__ generation; provide a use case for non-trivial __ne__ (issue 4395)

vadmium+py at gmail.com vadmium+py at gmail.com
Mon Jul 20 09:03:34 CEST 2015


https://bugs.python.org/review/4395/diff/15237/Doc/reference/datamodel.rst
File Doc/reference/datamodel.rst (right):

https://bugs.python.org/review/4395/diff/15237/Doc/reference/datamodel.rst#newcode1280
Doc/reference/datamodel.rst:1280: inverts the result.  There are no
other implied relationships
On 2015/07/20 07:22:28, storchaka wrote:
> Is it worth explicitly mention that __ne__ inverts the result if it is
not
> NotImplemented?

Yes I think so. I’ll prolly add something like “. . . inverts the result
unless it is ``NotImplemented``.”

https://bugs.python.org/review/4395/diff/15237/Lib/test/test_binop.py
File Lib/test/test_binop.py (right):

https://bugs.python.org/review/4395/diff/15237/Lib/test/test_binop.py#newcode387
Lib/test/test_binop.py:387: self.assertTrue(issubclass(V, B))
On 2015/07/20 07:22:28, storchaka wrote:
> assertIsSubclass?

Don’t think such a method exists; I only have assertIsInstance().

https://bugs.python.org/review/4395/


More information about the docs mailing list