Assert¶
- class astroid.nodes.Assert(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
Statement
Class representing an
ast.Assert
node.An
Assert
node represents an assert statement.>>> import astroid >>> node = astroid.extract_node('assert len(things) == 10, "Not enough things"') >>> node <Assert l.1 at 0x7effe1d527b8>