mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix for SF [ 734869 ] Lambda functions in list comprehensions
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry. Bugfix candidate.
This commit is contained in:
parent
6624e68546
commit
4d508adae3
5 changed files with 27 additions and 15 deletions
|
@ -61,6 +61,7 @@ PySymtableEntry_New(struct symtable *st, char *name, int type, int lineno)
|
|||
|
||||
ste->ste_optimized = 0;
|
||||
ste->ste_opt_lineno = 0;
|
||||
ste->ste_tmpname = 0;
|
||||
ste->ste_lineno = lineno;
|
||||
switch (type) {
|
||||
case funcdef:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue