This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author charles.newey
Recipients charles.newey, docs@python, ezio.melotti
Date 2014-07-30.11:16:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406719002.36.0.277664269973.issue22106@psf.upfronthosting.co.za>
In-reply-to
Content
Your point about using "pass" with the "with" statement sounds like a better example than using "pass" in a loop.

Perhaps even something like adding a note to the example to clarify it:
"""
# Don't use this in Python code - it is for illustrative purposes only
while True:
    pass  # Busy-wait for keyboard interrupt (Ctrl+C)
"""

On the other hand -- one could argue that the documentation should not show "incorrect" uses of Python syntax at all.
History
Date User Action Args
2014-07-30 11:16:42charles.neweysetrecipients: + charles.newey, ezio.melotti, docs@python
2014-07-30 11:16:42charles.neweysetmessageid: <1406719002.36.0.277664269973.issue22106@psf.upfronthosting.co.za>
2014-07-30 11:16:42charles.neweylinkissue22106 messages
2014-07-30 11:16:42charles.neweycreate