]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-100408: Fix a traceback in multiprocessing example (GH-100409) (GH-106231)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 29 Jun 2023 11:29:22 +0000 (04:29 -0700)
committerGitHub <noreply@github.com>
Thu, 29 Jun 2023 11:29:22 +0000 (14:29 +0300)
(cherry picked from commit a28d4edb23b7150942f1eceb9e97c6f53aa4de42)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/multiprocessing.rst

index b5ceeb796f8f2f25e410c3fa9563450c8932114a..26b057f297bf714ad1af2962c5072e6e53dfa19f 100644 (file)
@@ -453,16 +453,16 @@ process which created it.
       ...     return x*x
       ...
       >>> with p:
-      ...   p.map(f, [1,2,3])
+      ...     p.map(f, [1,2,3])
       Process PoolWorker-1:
       Process PoolWorker-2:
       Process PoolWorker-3:
       Traceback (most recent call last):
       Traceback (most recent call last):
       Traceback (most recent call last):
-      AttributeError: 'module' object has no attribute 'f'
-      AttributeError: 'module' object has no attribute 'f'
-      AttributeError: 'module' object has no attribute 'f'
+      AttributeError: Can't get attribute 'f' on <module '__main__' (built-in)>
+      AttributeError: Can't get attribute 'f' on <module '__main__' (built-in)>
+      AttributeError: Can't get attribute 'f' on <module '__main__' (built-in)>
 
    (If you try this it will actually output three full tracebacks
    interleaved in a semi-random fashion, and then you may have to