mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 23:21:29 +00:00 
			
		
		
		
	Merged revisions 76425 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
  r76425 | benjamin.peterson | 2009-11-19 19:19:41 -0600 (Thu, 19 Nov 2009) | 13 lines
  Merged revisions 76423-76424 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk
  ........
    r76423 | benjamin.peterson | 2009-11-19 19:15:53 -0600 (Thu, 19 Nov 2009) | 1 line
    provide line number for lambdas
  ........
    r76424 | benjamin.peterson | 2009-11-19 19:16:58 -0600 (Thu, 19 Nov 2009) | 1 line
    genexps have linenos
  ........
................
			
			
This commit is contained in:
		
							parent
							
								
									3a2249da1b
								
							
						
					
					
						commit
						db149ac59b
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -1331,9 +1331,8 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
		if (e->v.Lambda.args->defaults)
 | 
							if (e->v.Lambda.args->defaults)
 | 
				
			||||||
			VISIT_SEQ(st, expr, e->v.Lambda.args->defaults);
 | 
								VISIT_SEQ(st, expr, e->v.Lambda.args->defaults);
 | 
				
			||||||
		/* XXX how to get line numbers for expressions */
 | 
					 | 
				
			||||||
		if (!symtable_enter_block(st, lambda,
 | 
							if (!symtable_enter_block(st, lambda,
 | 
				
			||||||
                                          FunctionBlock, (void *)e, 0))
 | 
					                                          FunctionBlock, (void *)e, e->lineno))
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
		VISIT_IN_BLOCK(st, arguments, e->v.Lambda.args, (void*)e);
 | 
							VISIT_IN_BLOCK(st, arguments, e->v.Lambda.args, (void*)e);
 | 
				
			||||||
		VISIT_IN_BLOCK(st, expr, e->v.Lambda.body, (void*)e);
 | 
							VISIT_IN_BLOCK(st, expr, e->v.Lambda.body, (void*)e);
 | 
				
			||||||
| 
						 | 
					@ -1631,7 +1630,7 @@ symtable_handle_comprehension(struct symtable *st, expr_ty e,
 | 
				
			||||||
	VISIT(st, expr, outermost->iter);
 | 
						VISIT(st, expr, outermost->iter);
 | 
				
			||||||
	/* Create comprehension scope for the rest */
 | 
						/* Create comprehension scope for the rest */
 | 
				
			||||||
	if (!scope_name ||
 | 
						if (!scope_name ||
 | 
				
			||||||
	    !symtable_enter_block(st, scope_name, FunctionBlock, (void *)e, 0)) {
 | 
						    !symtable_enter_block(st, scope_name, FunctionBlock, (void *)e, e->lineno)) {
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	st->st_cur->ste_generator = is_generator;
 | 
						st->st_cur->ste_generator = is_generator;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue