]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Clarify that example in comment is about fromkeys() (GH-8141)
authorRaymond Hettinger <rhettinger@users.noreply.github.com>
Fri, 6 Jul 2018 15:52:26 +0000 (08:52 -0700)
committerGitHub <noreply@github.com>
Fri, 6 Jul 2018 15:52:26 +0000 (08:52 -0700)
Lib/collections/__init__.py

index cd2d2bfc10731ca7122418af6381c990623ed8b0..4724b0edf33a7cb81b3e605b530dafb27ca2a539 100644 (file)
@@ -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