From 21b66f066c28253405fd82d1680762a37f12ad68 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 5 Apr 2023 14:43:26 +0300 Subject: [PATCH 1/2] gh-100408: Fix a traceback in multiprocessing example (GH-100409) (cherry picked from commit a28d4edb23b7150942f1eceb9e97c6f53aa4de42) Co-authored-by: Serhiy Storchaka --- Doc/library/multiprocessing.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index b5ceeb796f8f2f..b1e754272919db 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -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 )> + 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 From 0ef3d2e76194ec96a7b51def7a01fba59565d322 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 29 Jun 2023 13:41:00 +0300 Subject: [PATCH 2/2] Update Doc/library/multiprocessing.rst --- Doc/library/multiprocessing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index b1e754272919db..26b057f297bf71 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -460,9 +460,9 @@ process which created it. Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): - AttributeError: Can't get attribute 'f' on )> - AttributeError: Can't get attribute 'f' on )> - AttributeError: Can't get attribute 'f' on )> + 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