Python 3.5.2 documents
http://docs.python.jp/3/tutorial/controlflow.html#pass-statements
The pass statement does nothing. pass is used when it is syntactically required to write a statement, but it does not need to do anything programmatically:
...
This is a popular method for creating minimal classes:
>>> class MyEmptyClass:
... pass
...
Another place where pass is used is the content of functions and conditional statements when writing new code. This way you can think at an abstract level without writing any concrete code. pass is ignored without doing anything:
>>> def initlog(*args):
... pass # Remember to implement this!
...
Is it possible to use it when doing "Pseudocode Programming Process" in Code Complete?
Recommended Posts