Message224296
URL: https://docs.python.org/2/tutorial/controlflow.html#pass-statements
Quoted verbatim:
"""
The pass statement does nothing. It can be used when a statement is required syntactically but the program requires no action. For example:
>>>
>>> while True:
... pass # Busy-wait for keyboard interrupt (Ctrl+C)
...
"""
While the example illustrates the point, it *may* give bad ideas to novice programmers reading it - "while True: pass" is an antipattern as it's very inefficient. |
|
Date |
User |
Action |
Args |
2014-07-30 10:47:09 | charles.newey | set | recipients:
+ charles.newey, docs@python |
2014-07-30 10:47:09 | charles.newey | set | messageid: <1406717229.88.0.0475217386951.issue22106@psf.upfronthosting.co.za> |
2014-07-30 10:47:09 | charles.newey | link | issue22106 messages |
2014-07-30 10:47:09 | charles.newey | create | |
|