[issue15850] list.count() results wrong if both booleans & 1's/0's are present in the list

Varun Masuraha report at bugs.python.org
Sun Sep 2 20:23:43 CEST 2012


Varun Masuraha added the comment:

Thanks Alex for the reply,

Although Booleans & Integers may not be very practical in same list (or tuple, etc.) & the fact that bool is subclass of int, still I feel that the search implementation (count, index, etc.) is too simple in that matter.
Comparing both Value AND Data type while searching, looks more exact to me...

regards,
Varun

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15850>
_______________________________________


More information about the Python-bugs-list mailing list