Keywords and Control Flow

pass — Empty statement

Provide a syntactically valid statement that performs no operation. It is useful for an intentionally empty class, function or branch; unlike continue, it does not skip the remaining loop body. It is not an implementation of a missing algorithm and should not conceal unfinished production behavior. A function containing only pass returns None through ordinary function fallthrough, not because pass returns a value.

Formal Syntax & Structure

python syntaxpython
pass

Working Example

Example Snippetpython
class Marker:    pass
for number in [1, 2]:    pass    print(number)print(isinstance(Marker(), Marker))
Python Reference