Message192239
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' |
|
Date |
User |
Action |
Args |
2013-07-03 14:43:25 | Olivier.Gagnon | set | recipients:
+ Olivier.Gagnon |
2013-07-03 14:43:25 | Olivier.Gagnon | set | messageid: <1372862605.72.0.11799816843.issue18352@psf.upfronthosting.co.za> |
2013-07-03 14:43:25 | Olivier.Gagnon | link | issue18352 messages |
2013-07-03 14:43:25 | Olivier.Gagnon | create | |
|