From: Raymond Hettinger Date: Fri, 6 Jul 2018 15:52:26 +0000 (-0700) Subject: Clarify that example in comment is about fromkeys() (GH-8141) X-Git-Tag: v3.8.0a1~1425 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc9bc548994066897ca4edfdbf36ea9272bfdee9;p=thirdparty%2FPython%2Fcpython.git Clarify that example in comment is about fromkeys() (GH-8141) --- diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index cd2d2bfc1073..4724b0edf33a 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -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