Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db9e20f

Browse files
committed
Fix bug reported by Just: anonymous arguments used for tuples should
have a unique name, otherwise they get squished by locals2fast (or fast2locals, I dunno) when the debugger is invoked before they have been transferred to real locals.
1 parent 475d51d commit db9e20f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/compile.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2995,6 +2995,7 @@ com_arglist(c, n)
29952995
{
29962996
int nch, i;
29972997
int complex = 0;
2998+
char nbuf[10];
29982999
REQ(n, varargslist);
29993000
/* varargslist:
30003001
(fpdef ['=' test] ',')* (fpdef ['=' test] | '*' .....) */
@@ -3011,7 +3012,8 @@ com_arglist(c, n)
30113012
if (TYPE(fp) == NAME)
30123013
name = STR(fp);
30133014
else {
3014-
name = "";
3015+
name = nbuf;
3016+
sprintf(nbuf, ".%d", i);
30153017
complex = 1;
30163018
}
30173019
com_newlocal(c, name);

0 commit comments

Comments
 (0)