From: Serhiy Storchaka Date: Wed, 5 Apr 2023 11:43:26 +0000 (+0300) Subject: gh-100408: Fix a traceback in multiprocessing example (#100409) X-Git-Tag: v3.12.0b1~642 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a28d4edb23b7150942f1eceb9e97c6f53aa4de42;p=thirdparty%2FPython%2Fcpython.git gh-100408: Fix a traceback in multiprocessing example (#100409) --- diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 0ec47bb956a9..8454296b815b 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -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 )> + AttributeError: Can't get attribute 'f' on )> + AttributeError: Can't get attribute 'f' on )> (If you try this it will actually output three full tracebacks interleaved in a semi-random fashion, and then you may have to