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 Olivier.Gagnon
Recipients Olivier.Gagnon
Date 2013-07-03.14:43:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za>
In-reply-to
Content
The following code shows that the Counter is not deepcopied properly. The 
same code with an user defined class or a dict is copied with the "b" attribute.

import collections
import copy

count = collections.Counter()
count.b = 3
print(count.b) # prints 3

count_copy = copy.deepcopy(count)
print(count_copy.b) # raise AttributeError: 'Counter' object has no attribute 'b'
History
Date User Action Args
2013-07-03 14:43:25Olivier.Gagnonsetrecipients: + Olivier.Gagnon
2013-07-03 14:43:25Olivier.Gagnonsetmessageid: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za>
2013-07-03 14:43:25Olivier.Gagnonlinkissue18352 messages
2013-07-03 14:43:25Olivier.Gagnoncreate