Author veky
Recipients Allen Downey, DavidMertz, josh.r, mark.dickinson, pitrou, rhettinger, serhiy.storchaka, steven.daprano, veky, wolma
Date 2018-05-17.20:02:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526587328.18.0.682650639539.issue25478@psf.upfronthosting.co.za>
In-reply-to
Content
As I said above, if we're going to go down that route, it seems much more reasonable to me that total should be a cached property, that's updated on every Counter update (in __setitem__, increased by a difference of a new value and an old one for that key).

And normalization should just provide a view over the Counter, that just passes the values through division with the above cached property. The view should of course be immutable by itself, but should reflect the changes of the underlying counter, just as already existing views (e.g. dict_values) do.
History
Date User Action Args
2018-05-17 20:02:08vekysetrecipients: + veky, rhettinger, mark.dickinson, pitrou, steven.daprano, serhiy.storchaka, wolma, josh.r, Allen Downey, DavidMertz
2018-05-17 20:02:08vekysetmessageid: <1526587328.18.0.682650639539.issue25478@psf.upfronthosting.co.za>
2018-05-17 20:02:08vekylinkissue25478 messages
2018-05-17 20:02:08vekycreate