]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] Fix typo in collections.abc docs example (GH-113310) (#113312)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 20 Dec 2023 09:57:25 +0000 (10:57 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Dec 2023 09:57:25 +0000 (09:57 +0000)
Fix typo in collections.abc docs example (GH-113310)

Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"
(cherry picked from commit 22b8945d7678be86f801ca54f004a5dba2006835)

Co-authored-by: David Greaves <david@dgreaves.com>
Doc/library/collections.abc.rst

index 3626757895fb8498bd89b4014392c2cb1b7a8e7a..0b05899d05a251730f54d6c82e33ba4ff726926c 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::