next up previous contents
Next: Defining Functions Up: More Control Flow Previous: Break and Continue

Pass Statements

The pass statement does nothing. It can be used when a statement is required syntactically but the program requires no action. For example:

>>> while 1:
...       pass # Busy-wait for keyboard interrupt
...



guido@cwi.nl