Message277008
Operator seems OK. After all, we can currently do c+c, which is kinda like c*2 (sequences behave this way generally, and it is a usual convention in mathematics too). And division by a number is just a multiplication by its reciprocal. But a dedicated normalize method? No. As Josh said, then you're forking the API.
The correct way is probably to have a "normalized view" of a Counter. But I don't know the best way to calculate it fast. I mean, I know it mathematically (cache the sum of values and update it on every Counter update) but I don't know whether it's Pythonic enough. |
|
Date |
User |
Action |
Args |
2016-09-20 05:23:22 | veky | set | recipients:
+ veky, rhettinger, mark.dickinson, pitrou, josh.r |
2016-09-20 05:23:22 | veky | set | messageid: <1474349002.69.0.841757961973.issue25478@psf.upfronthosting.co.za> |
2016-09-20 05:23:22 | veky | link | issue25478 messages |
2016-09-20 05:23:22 | veky | create | |
|