Note that there’s a need for this in the standard library.
This currently doesn’t give any type error from type checkers, but it crashes with TypeError:
from collections import Counter
my_counter = Counter({"a": "b"})
my_counter.total()
Note that there’s a need for this in the standard library.
This currently doesn’t give any type error from type checkers, but it crashes with TypeError:
from collections import Counter
my_counter = Counter({"a": "b"})
my_counter.total()