File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ All input read from non-interactive files has the same form:
6969.. grammar-snippet ::
7070   :group:  python-grammar
7171
72-    file:  `statement`* ENDMARKER
72+    file_input: ( `statement ` | NEWLINE) * ENDMARKER
7373
7474This syntax is used in the following situations:
7575
@@ -90,7 +90,7 @@ Input in interactive mode is parsed using the following grammar:
9090.. grammar-snippet ::
9191   :group:  python-grammar
9292
93-    interactive : [`stmt_list `] NEWLINE | `compound_stmt ` NEWLINE | ENDMARKER
93+    interactive_input : [`stmt_list `] NEWLINE | `compound_stmt ` NEWLINE | ENDMARKER
9494
9595Note that a (top-level) compound statement must be followed by a blank line in
9696interactive mode; this is needed to help the parser detect the end of the input.
@@ -110,5 +110,4 @@ string argument to :func:`eval` must have the following form:
110110.. grammar-snippet ::
111111   :group:  python-grammar
112112
113-    eval: `expressions ` NEWLINE* ENDMARKER
114-    expressions: `expression ` (',' `expression ` )* [',']
113+    eval_input: `expression_list ` NEWLINE* ENDMARKER
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments