This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Joshua.Chin
Recipients Joshua.Chin
Date 2014-10-30.15:06:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414681597.28.0.694367413403.issue22766@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, in-place operations on 'collections.Counter' with unsupported types raises an 'AttributeError'.

Example:
>>> import collections
>>> counter = collections.Counter()
>>> counter += 1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/collections/__init__.py", line 709, in __iadd__
    for elem, count in other.items():
AttributeError: 'int' object has no attribute 'items'

Instead, it should return 'NotImplemented' if 'other' is not a 'collections.Counter'
History
Date User Action Args
2014-10-30 15:06:37Joshua.Chinsetrecipients: + Joshua.Chin
2014-10-30 15:06:37Joshua.Chinsetmessageid: <1414681597.28.0.694367413403.issue22766@psf.upfronthosting.co.za>
2014-10-30 15:06:37Joshua.Chinlinkissue22766 messages
2014-10-30 15:06:37Joshua.Chincreate