Message224298
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. |
|
Date |
User |
Action |
Args |
2014-07-30 11:16:42 | charles.newey | set | recipients:
+ charles.newey, ezio.melotti, docs@python |
2014-07-30 11:16:42 | charles.newey | set | messageid: <1406719002.36.0.277664269973.issue22106@psf.upfronthosting.co.za> |
2014-07-30 11:16:42 | charles.newey | link | issue22106 messages |
2014-07-30 11:16:42 | charles.newey | create | |
|