Commit dc9bc548 authored by Raymond Hettinger's avatar Raymond Hettinger Committed by GitHub

Clarify that example in comment is about fromkeys() (GH-8141)

parent c2368cbc
......@@ -610,7 +610,7 @@ class Counter(dict):
@classmethod
def fromkeys(cls, iterable, v=None):
# There is no equivalent method for counters because the semantics
# would be ambiguous in cases such as Counter('aaabbc', v=2).
# would be ambiguous in cases such as Counter.fromkeys('aaabbc', v=2).
# Initializing counters to zero values isn't necessary because zero
# is already the default value for counter lookups. Initializing
# to one is easily accomplished with Counter(set(iterable)). For
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment