R. David Murray added the comment:

The documentation is technically correct, as far as I can see.  Issue 8743 is 
not about disallowing certain comparison operations, but rather incorrectly 
implementing the earlier sentence in that same doc section: "If the comparison 
is undefined, it must return Py_NotImplemented".  Perhaps the wording should be 
changed so that instead of saying "only a limited set of comparisons makes 
sense" it says "if you wish to disallow certain comparison operations while 
allowing others".  It should also probably be demoted from being a '.. note', 
since it is, as you note, an exceptional case, not a common one.

But you might be right that it would be better to delete it altogether, since 
it is generally better to let the comparison machinery raise the error if none 
of the types implements the comparison...what would be the rationale for a 
blanket *dis*allowing of a particular comparison operation?  

Let's see what Raymond thinks.

----------
nosy: +r.david.murray, rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29986>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to