Tuple¶
- class astroid.nodes.Tuple(ctx: Context | None = None, lineno: int | None = None, col_offset: int | None = None, parent: NodeNG | None = None, *, end_lineno: int | None = None, end_col_offset: int | None = None)[source]¶
Bases:
BaseContainer
Class representing an
ast.Tuple
node.>>> import astroid >>> node = astroid.extract_node('(1, 2, 3)') >>> node <Tuple.tuple l.1 at 0x7f23b2e41780>
- assigned_stmts(node: node_classes.AssignedStmtsPossibleNode = None, context: InferenceContext | None = None, assign_path: list[int] | None = None) Any ¶
Returns the assigned statement (non inferred) according to the assignment type. See astroid/protocols.py for actual implementation.
- infer_binary_op(**kwargs: _P.kwargs) Generator[InferenceResult] ¶
- infer_unary_op(op)¶