[Python-checkins] Update code sample when importing modules in queue doc (GH-94244)

ambv webhook-mailer at python.org
Fri Jul 1 11:51:55 EDT 2022


https://github.com/python/cpython/commit/ad55147c1d5dbfc23d2ec4554f5e82c18984158c
commit: ad55147c1d5dbfc23d2ec4554f5e82c18984158c
branch: main
author: Mariatta Wijaya <Mariatta at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2022-07-01T17:51:46+02:00
summary:

Update code sample when importing modules in queue doc (GH-94244)

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.

files:
M Doc/library/queue.rst

diff --git a/Doc/library/queue.rst b/Doc/library/queue.rst
index 540dde9e154e8..c67f15e953bcc 100644
--- a/Doc/library/queue.rst
+++ b/Doc/library/queue.rst
@@ -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()
 



More information about the Python-checkins mailing list