API reference
python:astx:astx.AliasExpr
class AliasExpr
AliasExpr(name: str, asname: str = '', loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/packages.py:272
Declared as: python:astx:astx.packages.AliasExpr
Represents an alias in an import statement.
Attributes
-
kind — Type: ASTKind
-
name — Type: str
-
asname — Type: str
Methods
-
__init__ — Initialize the alias expression.
-
__str__ — Return a string representation of the alias.
-
get_struct — Return the AST structure of the alias.