You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PDB missing function arguments in list comprehension #123141
If PDB is executed within a function trace and function argument arg is defined, executing [arg for _ in [0]] within PDB throws NameError: name 'arg' is not defined.
Execute the code until PDB breaks upon pdb.set_trace(). In PDB, executing t will return 42, but executing [t for _ in [0]] throws NameError: name 't' is not defined:
Log
[42]
--Return--
> /home/main.py(5)fun()->None
-> pdb.set_trace()
(Pdb) t
42
(Pdb) [t for _ in [0]]
*** NameError: name 't' is not defined
Activity
gaogaotiantian commentedon Aug 19, 2024
dup #65360 and is fixed in main/3.13 by #111094. (PEP 709 accidentally fixed part of the issue so 3.12 works fine in this specific case as well).