Re: [Python-Dev] counterintuitive behavior (bug?) in Counter with +=

2011-10-07 Thread Lars Buitinck
2011/10/6 Petri Lehtinen : > Lars Buitinck wrote: >>     >>> from collections import Counter >>     >>> a = Counter([1,2,3]) >>     >>> b = a >>     >>> a += Counter([3,4,5]) >>     >>> a is b >>     False

[Python-Dev] counterintuitive behavior (bug?) in Counter with +=

2011-10-03 Thread Lars Buitinck
([1,2,3]) >>> b = a >>> a += Counter([3,4,5]) >>> a is b False would become # snip >>> a is b True TIA, Lars [1] https://github.com/scikit-learn/scikit-learn/commit/de6e93094499e4d81b8e3b15fc66b6b9252945af [2] http://hg.python.org/