[issue28785] Clarify the behavior of NotImplemented

2016-11-25 Thread Martin Panter
Martin Panter added the comment: Correct, I meant to say the first fallback is the other call. BTW your suggested text might hold for __eq__(), but for __ne__(), returning NotImplemented seems to bypass the “not a.__eq__(b)” fallback. -- ___ Python

[issue28785] Clarify the behavior of NotImplemented

2016-11-24 Thread Max
Max added the comment: Martin - what you suggest is precisely what I had in mind (but didn't phrase it as well): > to document the above sort of behaviour as being directly associated with > operations like as == and !=, and only indirectly associated with the > NotImplemented object and the

[issue28785] Clarify the behavior of NotImplemented

2016-11-24 Thread Martin Panter
Martin Panter added the comment: The documentation of this that comes to mind is spread over and . My understanding of how it works in general is that

[issue28785] Clarify the behavior of NotImplemented

2016-11-24 Thread Max
New submission from Max: Currently, there's no clear statement as to what exactly the fallback is in case `__eq__` returns `NotImplemented`. It would be good to clarify the behavior of `NotImplemented`; at least for `__eq__`, but perhaps also other rich comparison methods. For example: "When