File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2440,7 +2440,6 @@ static int
24402440compiler_from_import (struct compiler * c , stmt_ty s )
24412441{
24422442 int i , n = asdl_seq_LEN (s -> v .ImportFrom .names );
2443- int star = 0 ;
24442443
24452444 PyObject * names = PyTuple_New (n );
24462445 if (!names )
@@ -2474,8 +2473,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
24742473 if (i == 0 && * PyString_AS_STRING (alias -> name ) == '*' ) {
24752474 assert (n == 1 );
24762475 ADDOP (c , IMPORT_STAR );
2477- star = 1 ;
2478- break ;
2476+ return 1 ;
24792477 }
24802478
24812479 ADDOP_NAME (c , IMPORT_FROM , alias -> name , names );
@@ -2488,9 +2486,8 @@ compiler_from_import(struct compiler *c, stmt_ty s)
24882486 return 0 ;
24892487 }
24902488 }
2491- if (!star )
2492- /* remove imported module */
2493- ADDOP (c , POP_TOP );
2489+ /* remove imported module */
2490+ ADDOP (c , POP_TOP );
24942491 return 1 ;
24952492}
24962493
You can’t perform that action at this time.
0 commit comments