CodeQL library for Python
codeql/python-all 6.0.1-dev (changelog, source)
Search

Class Tuple

A tuple expression such as ( 1, 3, 5, 7, 9 )

Import path

import python

Direct supertypes

Indirect supertypes

Predicates

getASubExpression

Gets an immediate (non-nested) sub-expression of this expression

Inherited predicates

contains

Whether this contains inner syntactically

from AstNode
containsInScope

Whether this contains inner syntactically and inner has the same scope as this

from AstNode
defines

Whether this expression defines variable v If doing dataflow, then consider using SsaVariable.getDefinition() for more precision.

from Expr
getAChildNode

Gets a child node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt().

from Expr
getAFlowNode

Gets a flow node corresponding directly to this node. NOTE: For some statements and other purely syntactic elements, there may not be a ControlFlowNode

from AstNode
getAnElt

Gets an element of this tuple expression.

from Tuple_
getCtx

Gets the context of this tuple expression.

from Tuple_
getElt

Gets the nth element of this tuple expression.

from Tuple_
getElts

Gets the elements of this tuple expression.

from Tuple_
getEnclosingModule

Gets the module in which this expression occurs

from Expr
getLocationfrom Expr
getParent

Gets a parent of this expression

from Tuple_
getParentNode

Gets the parent node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt() applied to the parent.

from AstNode
getScope

Gets the scope of this expression

from Expr
hasSideEffects

Whether this expression may have a side effect (as determined purely from its syntax)

from Expr
isArtificial

Whether this syntactic element is artificial, that is it is generated by the compiler and is not present in the source

from AstNode
isConstant

Whether this expression is a constant

from Expr
isParenthesised

Whether the parenthesised property of this expression is true.

from Expr_
isParenthesized

Whether the parenthesized property of this expression is true.

from Expr
toString

Gets a textual representation of this element.

from Tuple_