[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2009-06-21 Thread Michael K. Edwards
Michael K. Edwards m.k.edwa...@gmail.com added the comment: The implementation you are looking for is in object_richcompare, in http://svn.python.org/projects/python/branches/py3k/Objects/typeobject.c . It would be most accurate to say something like: The object base class, from which all

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2009-06-21 Thread Michael K. Edwards
Michael K. Edwards m.k.edwa...@gmail.com added the comment: It would also be useful to point out that there is a shortcut in the interpreter itself (PyObject_RichCompareBool, in object.c) which checks the equivalent of id(a) == id(b) and bypasses __eq__/__ne__ if so. Since not every call

[issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__

2008-11-24 Thread Michael K. Edwards
Michael K. Edwards [EMAIL PROTECTED] added the comment: It would be really useful to explain, right in this section, why __ne__ is worth having. Something along these lines (based on the logic from Python 2.x -- modify as necessary): doctext The values most commonly returned by the rich