New submission from Charles Newey: 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. ---------- assignee: docs@python components: Documentation messages: 224296 nosy: Charles.Newey, docs@python priority: normal severity: normal status: open title: Python 2 docs 'control flow/pass' section contains bad example type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22106> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com