synt.expr.modpath
¤
ModPath
¤
Bases: IntoCode
Module path.
Examples:
Source code in synt/expr/modpath.py
__init__
¤
|
Initialize a new module path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
names |
Identifier
|
Names of the path. |
()
|
depth |
int
|
Relative depth of the path. |
0
|
dep
¤
Set the depth of the path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
depth |
int
|
New depth of the path. |
required |
into_code
¤
as_
¤
|
Alias the import path.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
asname |
Identifier
|
Name of the alias. |
required |
relpath
¤
|
Initialize a path relatively (depth = 1
).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
names |
Identifier
|
Names of the path. |
()
|
Examples:
Source code in synt/expr/modpath.py
parentpath
¤
|
Initialize a path from its parent (depth = 2
).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
names |
Identifier
|
Names of the path. |
()
|
Examples: