Class Expr
An expression
Import path
import python
Indirect supertypes
Known direct subtypes
- AssignExpr_
- Attribute_
- Await_
- BinaryExpr_
- BoolExpr_
- Bytes_
- Call_
- CallableExpr
- ClassExpr_
- Comp
- Compare_
- DictComp_
- Dict_
- Ellipsis_
- Filter_
- FormattedValue_
- Fstring_
- FunctionExpr_
- GeneratorExp_
- Guard_
- IfExp_
- ImmutableLiteral
- ImportExpr_
- ImportMember_
- Lambda_
- ListComp_
- List_
- Name_
- NiceLocationExpr
- Num_
- PlaceHolder_
- RegExp
- Repr_
- SetComp_
- Set_
- Slice_
- SpecialOperation_
- Starred_
- Str_
- Subscript_
- TemplateDottedNotation_
- Tuple_
- UnaryExpr_
- YieldFrom_
- Yield_
Predicates
defines |
Whether this expression defines variable |
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(). |
getASubExpression |
Gets an immediate (non-nested) sub-expression of this expression |
getEnclosingModule |
Gets the module in which this expression occurs |
getLocation | |
getScope |
Gets the scope of this expression |
hasSideEffects |
Whether this expression may have a side effect (as determined purely from its syntax) |
isConstant |
Whether this expression is a constant |
isParenthesized |
Whether the parenthesized property of this expression is true. |
pointsTo |
Gets a value that this expression might “point-to”. |
pointsTo |
Holds if this expression might “point-to” to |
pointsTo |
Holds if this expression might “point-to” to |
pointsTo |
Holds if this expression might “point-to” to |
refersTo |
NOTE: |
refersTo |
NOTE: |
refersTo |
NOTE: |
refersTo |
NOTE: |
toString |
Gets a textual representation of this element. |
Inherited predicates
contains |
Whether this contains |
from AstNode |
containsInScope |
Whether this contains |
from AstNode |
getAFlowNode |
Gets a flow node corresponding directly to this node. NOTE: For some statements and other purely syntactic elements, there may not be a |
from AstNode |
getParent |
Gets a parent of this expression |
from Expr_ |
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 |
isArtificial |
Whether this syntactic element is artificial, that is it is generated by the compiler and is not present in the source |
from AstNode |
isParenthesised |
Whether the parenthesised property of this expression is true. |
from Expr_ |