Михальцов Данила, 528 DefCounter 11983
Антон Щербаков, 523 DefCounter 12280
f1from collections import Counterf1from collections import Counter
22
3class DefCounter(Counter):3class DefCounter(Counter):
44
n5    def __init__(self, iterable=None, /, missing=-1, **kwds):n5    def __init__(self, iterable=None, missing=-1, **kwds):
6        self._missing = missing6        self.missing = missing
7        super().__init__(iterable, **kwds)7        super().__init__(iterable, **kwds)
88
9    def __missing__(self, key):9    def __missing__(self, key):
t10        return self._missingt10        return self.missing
1111
12    def __abs__(self):12    def __abs__(self):
13        return sum((x for x in self.values() if x > 0))13        return sum((x for x in self.values() if x > 0))
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op