synt.stmt.importing
¤
Import
¤
Bases: Statement
The import
statement.
Examples:
References
Source code in synt/stmt/importing.py
__init__
¤
Initialize a new import
statement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
names |
ImportType
|
Identifiers that are imported. |
()
|
Raises:
Type | Description |
---|---|
ValueError
|
If no import names are provided. |
Source code in synt/stmt/importing.py
indented
¤
Source code in synt/stmt/importing.py
ImportFrom
¤
Bases: Statement
The from ... import
statement.
Examples:
References
Source code in synt/stmt/importing.py
__init__
¤
Initialize a new from ... import
statement.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module |
ModPath
|
The module to import from. |
required |
names |
ImportType
|
Identifiers that are imported. |
()
|
Raises:
Type | Description |
---|---|
ValueError
|
If no import names are provided. |
Source code in synt/stmt/importing.py
indented
¤
Source code in synt/stmt/importing.py
ImportFromBuilder
¤
The builder for ImportFrom
.
Source code in synt/stmt/importing.py
__init__
¤
|
Initialize a new from ... import
statement builder.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
module |
ModPath | Identifier
|
The module to import from. |
required |
Source code in synt/stmt/importing.py
import_
¤
|
Import target objects from the module.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
names |
ImportType
|
Items that are imported. |
()
|
Raises:
Type | Description |
---|---|
ValueError
|
If no import names are provided. |