[Python-Dev] counterintuitive behavior (bug?) in Counter with += (original) (raw)
Petri Lehtinen petri at digip.org
Thu Oct 6 17:46:37 CEST 2011
- Previous message: [Python-Dev] counterintuitive behavior (bug?) in Counter with +=
- Next message: [Python-Dev] counterintuitive behavior (bug?) in Counter with +=
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Lars Buitinck wrote:
>>> from collections import Counter >>> a = Counter([1,2,3]) >>> b = a >>> a += Counter([3,4,5]) >>> a is b False
would become # snip >>> a is b True
Sounds like a good idea to me. You should open an issue in the tracker at http://bugs.python.org/.
- Previous message: [Python-Dev] counterintuitive behavior (bug?) in Counter with +=
- Next message: [Python-Dev] counterintuitive behavior (bug?) in Counter with +=
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]