Class ClassExpr
An (artificial) expression corresponding to a class definition.
It is recommended to use ClassDef
instead.
Import path
import python
Direct supertypes
Indirect supertypes
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(). |
getADecorator |
Gets a decorator of this function expression |
getADecoratorCall |
Gets a call corresponding to a decorator of this class definition. |
getAKeyword |
Gets a keyword argument of this class definition. |
getASubExpression |
Gets an immediate (non-nested) sub-expression of this expression |
getKeyword |
Gets the nth keyword argument of this class definition. |
getKwargs |
Gets a dictionary (**) argument of this class definition. |
getMetaClass |
Gets the metaclass expression |
getStarargs |
Gets a tuple (*) argument of this class definition. |
Inherited predicates
contains |
Whether this contains |
from AstNode |
containsInScope |
Whether this contains |
from AstNode |
defines |
Whether this expression defines variable |
from Expr |
getABase |
Gets a base of this class definition. |
from ClassExpr_ |
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 |
getBase |
Gets the nth base of this class definition. |
from ClassExpr_ |
getBases |
Gets the bases of this class definition. |
from ClassExpr_ |
getEnclosingModule |
Gets the module in which this expression occurs |
from Expr |
getInnerScope |
Gets the class scope of this class definition. |
from ClassExpr_ |
getKeywords |
Gets the keyword arguments of this class definition. |
from ClassExpr_ |
getLocation | from Expr | |
getName |
Gets the name of this class definition. |
from ClassExpr_ |
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 |
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 |
pointsTo |
Holds if this expression might “point-to” to |
from Expr |
pointsTo |
Holds if this expression might “point-to” to |
from Expr |
pointsTo |
Holds if this expression might “point-to” to |
from Expr |
pointsTo |
Gets a value that this expression might “point-to”. |
from Expr |
refersTo |
NOTE: |
from Expr |
refersTo |
NOTE: |
from Expr |
refersTo |
NOTE: |
from Expr |
refersTo |
NOTE: |
from Expr |
toString |
Gets a textual representation of this element. |
from ClassExpr_ |