pass_stmt |
::= | "pass" |
pass is a null operation -- when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed, for example:
pass 是一个空操作 -- 当执行它, 什么也不做. 它在句法上要求有一个语句时但不需要写代码时用到,例如:
def f(arg): pass # a function that does nothing (yet) class C: pass # a class with no methods (yet)