in the IPython shell, it gives NameError: name 'a' is not defined.
The use of SetPropagatingDict would fix this. It looks like the IPython shell is doing some weird stuff, so I'm not exactly clear on how to fix this.
Also we should update the docs for SetPropagatingDict to make it clear that basically every shell should use it, unless they really know what they are doing. This is because globals/locals being separate dictionaries creates odd behavior with exec (basically, it acts like a class body), which is generally much different from what you would expect from a shell.
The text was updated successfully, but these errors were encountered:
For instance, if you run
and
in the IPython shell, it gives
NameError: name 'a' is not defined.The use of SetPropagatingDict would fix this. It looks like the IPython shell is doing some weird stuff, so I'm not exactly clear on how to fix this.
Also we should update the docs for SetPropagatingDict to make it clear that basically every shell should use it, unless they really know what they are doing. This is because globals/locals being separate dictionaries creates odd behavior with exec (basically, it acts like a class body), which is generally much different from what you would expect from a shell.
The text was updated successfully, but these errors were encountered: