We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b9af3c commit 4872b1cCopy full SHA for 4872b1c
1 file changed
stdl/lst.py
@@ -91,13 +91,13 @@ def every_nth(items: list[T], n: int) -> list[T]:
91
return items[n - 1 :: n]
92
93
94
-def occurrences(items: Sequence[T], val: object) -> int:
+def occurrences(items: Sequence[T], val: T) -> int:
95
"""
96
Count the number of occurrences of a value in a list.
97
98
Args:
99
items (Sequence[T]): The list to count values in.
100
- val (object): The value to count.
+ val: The value to count.
101
102
Returns:
103
int: Number of occurrences.
0 commit comments