On Wed, Aug 7, 2013 at 10:24 AM, Shiyao Ma <i...@introo.me> wrote:
> Sorry. I don't quite get it. As you said, it first tries,
> leftOperand.__eq__(rightOperand) then if it returns NotImplemented, it goes
> to invoke rightOperand.__eq__(leftOperand). But for any reason, [] == ()
> returns false, why?

If neither of them has implemented a check, then it's assumed they're
not equal. It wouldn't be helpful for the == operator to return
anything other than True or False (except maybe NaN), so it returns
False.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to