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
def func():
a = list(range(7))
d = dict(zip(a, a))
# these lines work in embedded shell
res = [i for i in a]
res = [1 for i in a]
# these lines dont work in embedded shell (Name error)
res = [d[i] for i in a]
res = [a[i] for i in a]
res = [a[0] for i in a]
IPS()
func()
Reproduce:
from ipydex import IPS
The background seems to be ipython/ipython#62
There, the following workarround is proposed:
globals().update(locals())
(to be executed in the shell)The text was updated successfully, but these errors were encountered: