[issue14182] collections.Counter equality test thrown-off by zero counts

2012-08-07 Thread Stephen Webber
Stephen Webber added the comment: Hmm, that is odd behavior indeed. I think having keys that point to zero values is important for iterating over a set. For example: >>> x = Counter(a=10, b=0) >>> for k in set(x): ... x[k] += 1 ... >>> x Counter({'a':

[issue14182] collections.Counter equality test thrown-off by zero counts

2012-08-05 Thread Stephen Webber
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.o