mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-05 03:08:33 +00:00
Import all from_list in one __import__ call
This commit is contained in:
parent
e85f8b18df
commit
a932b729d8
3 changed files with 55 additions and 25 deletions
|
@ -50,7 +50,7 @@ pub enum NameScope {
|
|||
pub enum Instruction {
|
||||
Import {
|
||||
name: String,
|
||||
symbol: Option<String>,
|
||||
symbols: Vec<String>,
|
||||
},
|
||||
ImportStar {
|
||||
name: String,
|
||||
|
@ -330,7 +330,7 @@ impl Instruction {
|
|||
}
|
||||
|
||||
match self {
|
||||
Import { name, symbol } => w!(Import, name, format!("{:?}", symbol)),
|
||||
Import { name, symbols } => w!(Import, name, format!("{:?}", symbols)),
|
||||
ImportStar { name } => w!(ImportStar, name),
|
||||
LoadName { name, scope } => w!(LoadName, name, format!("{:?}", scope)),
|
||||
StoreName { name, scope } => w!(StoreName, name, format!("{:?}", scope)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue