]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix typo in collections.abc docs example (#113310)
authorDavid Greaves <david@dgreaves.com>
Wed, 20 Dec 2023 09:51:16 +0000 (09:51 +0000)
committerGitHub <noreply@github.com>
Wed, 20 Dec 2023 09:51:16 +0000 (09:51 +0000)
Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"

Doc/library/collections.abc.rst

index e0c72ff9249ee7ee039de5ad778fceea2fc36b0b..582bb18f752bd59e730ce419636ed1bceef864ff 100644 (file)
@@ -87,7 +87,7 @@ the required methods (unless those methods have been set to
 
     class E:
         def __iter__(self): ...
-        def __next__(next): ...
+        def __next__(self): ...
 
 .. doctest::