[issue14182] collections.Counter equality test thrown-off by zero counts
Stephen Webber
report at bugs.python.org
Mon Aug 6 04:44:47 CEST 2012
Stephen Webber added the comment:
This is intentional handling of non-existant variables, and is not resticted to '==' operations. Returning the value of a Counter parameter that has not yet been set returns 0 by default.
See the documentation here:
http://docs.python.org/library/collections.html
"Counter objects have a dictionary interface except that they return a zero count for missing items instead of raising a KeyError:"
Since this is intended behavior, I recommend this bug become closed.
----------
nosy: +ForeverBacchus
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14182>
_______________________________________
More information about the Python-bugs-list
mailing list