Wolfgang Maier added the comment:

No, it's not that simple and I don't think this should be closed:

In my example:
>>> l = ['a', '', {}, 2.7, 1, 0, False, True]
>>> l.index(True)
4
>>> l.index(False)
5

if using __eq__ consistently, you'd expect the first call to return 0 and the 
second 1 (since the empty string evaluates to False).

----------

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

Reply via email to