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
I have found an issue where closures are not being formed properly when in interactive mode of an ipdb session. Namely, variables defined in the session are not visible to function closures.
Example:
$ pythonPython3.8.12 (default, Dec182023, 10:05:54)
[GCC9.4.0] onlinuxType"help", "copyright", "credits"or"license"formoreinformation.
>>>importipdb; ipdb.set_trace()
--Return--None><stdin>(1)<module>()
ipdb>x=None; [xfor _ in [None]] # Note how this works when not in interactive mode
[None]
ipdb>interact*interactive*17:09:53In [1] x=None; [xfor _ in [None]]
---------------------------------------------------------------------------NameErrorTraceback (mostrecentcalllast)
File<ipython-input-1-92de5d84d68a>:1---->1x=None; [xfor _ in [None]]
File<ipython-input-1-92de5d84d68a>:1, in<listcomp>(.0)
---->1x=None; [xfor _ in [None]]
NameError: name'x'isnotdefined
I have found an issue where closures are not being formed properly when in interactive mode of an
ipdb
session. Namely, variables defined in the session are not visible to function closures.Example:
Another example:
These two examples work correctly inside interactive mode of
pdb
, or when in a normal ipython/python session.Environment Info:
ipdb
: 0.13.13python
: 3.8.12The text was updated successfully, but these errors were encountered: