Returning NotImplemented from __eq__
问题 What's the result of returning NotImplemented from __eq__ special method in python 3 (well 3.5 if it matters)? The documentation isn't clear; the only relevant text I found only vaguely refers to "some other fallback": When NotImplemented is returned, the interpreter will then try the reflected operation on the other type, or some other fallback, depending on the operator. If all attempted operations return NotImplemented , the interpreter will raise an appropriate exception. See Implementing