Author mark.dickinson
Recipients Allen Downey, DavidMertz, josh.r, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, steven.daprano, veky, wolma
Date 2018-05-18.07:05:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526627130.27.0.682650639539.issue25478@psf.upfronthosting.co.za>
In-reply-to
Content
> total should be a cached property, that's updated on every Counter update

That would run into difficulties for Counters with float values: e.g., after

>>> c = Counter()
>>> c['spam'] = 1e100
>>> c['eggs'] = 1
>>> c['spam'] = 0

the  cached total would likely be 0.0, because that's what the sum of the (new-old) values gives:

>>> (1e100 - 0) + (1 - 0) + (0 - 1e100)
0.0
History
Date User Action Args
2018-05-18 07:05:30mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, pitrou, steven.daprano, serhiy.storchaka, wolma, josh.r, veky, Allen Downey, DavidMertz
2018-05-18 07:05:30mark.dickinsonsetmessageid: <1526627130.27.0.682650639539.issue25478@psf.upfronthosting.co.za>
2018-05-18 07:05:30mark.dickinsonlinkissue25478 messages
2018-05-18 07:05:30mark.dickinsoncreate