]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-100408: Fix a traceback in multiprocessing example (#100409)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 5 Apr 2023 11:43:26 +0000 (14:43 +0300)
committerGitHub <noreply@github.com>
Wed, 5 Apr 2023 11:43:26 +0000 (12:43 +0100)
Doc/library/multiprocessing.rst

index 0ec47bb956a99e0f7eeb8c3e02c1a1321f18acf5..8454296b815b41e402df09e40b075e084dc91a44 100644 (file)
@@ -460,16 +460,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__' (<class '_frozen_importlib.BuiltinImporter'>)>
+      AttributeError: Can't get attribute 'f' on <module '__main__' (<class '_frozen_importlib.BuiltinImporter'>)>
+      AttributeError: Can't get attribute 'f' on <module '__main__' (<class '_frozen_importlib.BuiltinImporter'>)>
 
    (If you try this it will actually output three full tracebacks
    interleaved in a semi-random fashion, and then you may have to