API reference
python:astx:astx.packages.ImportExpr
class ImportExpr
ImportExpr(names: list[AliasExpr], loc: SourceLocation = NO_SOURCE_LOCATION, parent: Optional[ASTNodes] = None)
Source: packages/astx/src/astx/packages.py:489
Represents an import operation as an expression.
Attributes
-
kind — Type: ASTKind
-
names — Type: list[AliasExpr]
Methods
-
__init__ — Initialize the import expression.
-
__str__ — Return a string representation of the import expression.
-
get_struct — Return the AST structure of the import expression.