Assign¶
- class astroid.nodes.Assign(lineno: int | None, col_offset: int | None, parent: NodeNG | None, *, end_lineno: int | None, end_col_offset: int | None)[source]¶
Bases:
AssignTypeNode
,Statement
Class representing an
ast.Assign
node.An
Assign
is a statement where something is explicitly asssigned to.>>> import astroid >>> node = astroid.extract_node('variable = range(10)') >>> node <Assign l.1 at 0x7effe1db8550>
- assigned_stmts(**kwargs: _P.kwargs) Generator[InferenceResult] ¶
Returns the assigned statement (non inferred) according to the assignment type. See astroid/protocols.py for actual implementation.