[issue41400] Remove references to nonexisting __ne__ methods

Raymond Hettinger report at bugs.python.org
Sun Jul 26 15:51:59 EDT 2020


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

>From a user point of view, your edit makes it look like they have to supply __ne__() if they want support for the != operator.  The user would have to know the subtle details of the language to know this is not the case.  In documentation, more so than in code, explicit is better than implicit.

The tables that we have now do a good job of communicating, "if you supply these methods, then these other methods follow automatically".  It matters very little where those methods were defined in the __mro__.  In Python 2.7, collections.Set used to explicitly define __ne__ and now it just inherits it from object, but that is close to being just an implementation detail.  From a user point of view, it is the same.

It would fine to add a technical implementation note somewhere, perhaps as a footnote to the "Mixin Methods" column.  But mostly, the documentation is more useful and clear as it stands now.  In my professional life, I teach engineers directly from these tables, so I have extensive experience with the user's point of view on these particular docs.

----------

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


More information about the Python-bugs-list mailing list