Counter
class Counter[T]
Fields
1
T
type
Constructors
5
Methods
17
get(self: Self, key: T, /)
Defined in
collectionsget(self: Self, key: T, default: int, /)
Defined in
collectionspop(self: Self, key: T, /)
Defined in
collectionspop(self: Self, key: T, missing, /)
Defined in
collectionsmost_common(self: Self, n: Optional[int] = None) -> List[Tuple[(T, int)]]
Defined in
collectionssubtract(self: Self, elements: Generator[T], /)
Defined in
collectionssubtract(self: Self, other: Counter[T], /)
Defined in
collectionssubtract(self: Self, other: Dict[(T, int)], /)
Defined in
collectionssubtract[S: type](self: Self, other: defaultdict[(T, int, S)], /)
Added by
collectionsupdate(self: Self, elements: Generator[T], /)
Defined in
collectionsupdate(self: Self, other: Counter[T], /)
Defined in
collectionsupdate(self: Self, other: Dict[(T, int)], /)
Defined in
collectionsupdate(self: Self, /)
Defined in
collectionsupdate[S: type](self: Self, other: defaultdict[(T, int, S)], /)
Added by
collections
Special methods
25
__eq__(self: Self, other: Counter[T]) -> bool
Defined in
collections__eq__(self: Self, other: Dict[(T, int)]) -> bool
Defined in
collections__eq__[S: type](self: Self, other: defaultdict[(T, int, S)])
Added by
collections__ne__(self: Self, other: Counter[T]) -> bool
Defined in
collections__ne__(self: Self, other: Dict[(T, int)]) -> bool
Defined in
collections__ne__[S: type](self: Self, other: defaultdict[(T, int, S)])
Added by
collections__or__(self: Self, other)
Defined in
collections__or__(self: Self, other: Counter[T]) -> Counter[T]
Defined in
collections__ior__(self: Self, other)
Defined in
collections__ior__(self: Self, other: Counter[T]) -> Counter[T]
Defined in
collections__dict_do_op__[F: type, Z: type](self: Self, key: T, other: Z, default: int, op: F)
Defined in
collections__dict_do_op_throws__[F: type, Z: type](self: Self, key: T, other: Z, op: F)
Defined in
collections