]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update code sample when importing modules in queue doc (GH-94244)
authorMariatta Wijaya <Mariatta@users.noreply.github.com>
Fri, 1 Jul 2022 15:51:46 +0000 (08:51 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Jul 2022 15:51:46 +0000 (17:51 +0200)
In the queue documentation, the code snippet shows the import to be not PEP 8 compliant.

Since people typically copy-paste from such code samples, I think it's important to show best-practices here.

Doc/library/queue.rst

index 540dde9e154e806e9a98cc5f887ac484641349e1..c67f15e953bccc97c1eedaf3ec8755f95b067e02 100644 (file)
@@ -190,7 +190,8 @@ fully processed by daemon consumer threads.
 
 Example of how to wait for enqueued tasks to be completed::
 
-    import threading, queue
+    import threading
+    import queue
 
     q = queue.Queue()