Message317005
> 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 |
|
Date |
User |
Action |
Args |
2018-05-18 07:05:30 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, pitrou, steven.daprano, serhiy.storchaka, wolma, josh.r, veky, Allen Downey, DavidMertz |
2018-05-18 07:05:30 | mark.dickinson | set | messageid: <1526627130.27.0.682650639539.issue25478@psf.upfronthosting.co.za> |
2018-05-18 07:05:30 | mark.dickinson | link | issue25478 messages |
2018-05-18 07:05:30 | mark.dickinson | create | |
|