Class Pattern
A pattern in a match statement
Import path
import pythonIndirect supertypes
Known direct subtypes
Predicates
| 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 pattern |
| getASubPattern | Gets an immediate (non-nested) sub-pattern of this pattern |
| getASubStatement | Gets an immediate (non-nested) sub-statement of this pattern |
| getCase | Gets the case statement containing this pattern |
| getEnclosingModule | Gets the module enclosing this pattern |
| getLocation | |
| getScope | Gets the scope of this pattern |
| isParenthesized | Whether the parenthesized property of this expression is true. |
| toString |
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 pattern | from Pattern_ |
| 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 pattern is true. | from Pattern_ |