Comment 1 for bug 363115

Revision history for this message
avdd (avdd) wrote :

Has nothing to do with pickle, but the FakeModule that is registered as __main__:

$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.modules[__name__].foo = 1
>>> foo
1
>>>

a$ ipython

In [1]: import sys

In [2]: sys.modules[__name__].foo = 1

In [3]: foo
---------------------------------------------------------------------------
NameError Traceback (most recent call last)

/home/avdd/<ipython console> in <module>()

NameError: name 'foo' is not defined

In [4]: