Charles Newey added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22106>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com