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