Raymond Hettinger <[email protected]> added the comment:
As Josh pointed out, this is how counters are documented and tested to work, so
it is an unchangeable decision (i.e. it would break code that relying on the
saturating arithmetic feature). Accordingly, I'm marking this as closed, not a
bug.
On the plus side (no pun intended), a counter is just a kind of dictionary so
you can easily implement your own behaviors with just a simple for-loop:
for x in a:
b[a] += a
----------
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36380>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com