This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients brett.cannon, docs@python, eric.snow, ncoghlan, petr.viktorin, r.david.murray
Date 2015-05-02.17:15:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430586911.08.0.358907290196.issue24081@psf.upfronthosting.co.za>
In-reply-to
Content
OK, I can't reproduce it either, neither in python3 nor python2.  Brett, is this left over from a long time ago?

Heh.  I just tried another experiment and got an interesting result:

rdmurray@pydev:~/python/p34>cat temp1.py
import temp2
foo = 1
rdmurray@pydev:~/python/p34>cat temp2.py
import temp1

badval

rdmurray@pydev:~/python/p34>./python
Python 3.4.3+ (3.4:b53cfcfdfe47, May  2 2015, 12:51:46) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import temp2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rdmurray/python/p34/temp2.py", line 3, in <module>
    badval
NameError: name 'badval' is not defined
>>> import sys
>>> sorted(sys.modules.keys())
['__main__', '_codecs', '_collections_abc', '_frozen_importlib', '_imp', '_io', '_sitebuiltins', '_stat', '_sysconfigdata', '_thread', '_warnings', '_weakref', '_weakrefset', 'abc', 'atexit', 'builtins', 'codecs', 'encodings', 'encodings.aliases', 'encodings.latin_1', 'encodings.utf_8', 'errno', 'genericpath', 'io', 'marshal', 'os', 'os.path', 'posix', 'posixpath', 'readline', 'rlcompleter', 'signal', 'site', 'stat', 'sys', 'sysconfig', 'temp1', 'zipimport']
>>> import temp1
>>> temp1.temp2
<module 'temp2' from '/home/rdmurray/python/p34/temp2.py'>
>>> sorted(sys.modules.keys())
['__main__', '_codecs', '_collections_abc', '_frozen_importlib', '_imp', '_io', '_sitebuiltins', '_stat', '_sysconfigdata', '_thread', '_warnings', '_weakref', '_weakrefset', 'abc', 'atexit', 'builtins', 'codecs', 'encodings', 'encodings.aliases', 'encodings.latin_1', 'encodings.utf_8', 'errno', 'genericpath', 'io', 'marshal', 'os', 'os.path', 'posix', 'posixpath', 'readline', 'rlcompleter', 'signal', 'site', 'stat', 'sys', 'sysconfig', 'temp1', 'zipimport']


More or less the reverse of the passage in question.
History
Date User Action Args
2015-05-02 17:15:11r.david.murraysetrecipients: + r.david.murray, brett.cannon, ncoghlan, petr.viktorin, docs@python, eric.snow
2015-05-02 17:15:11r.david.murraysetmessageid: <1430586911.08.0.358907290196.issue24081@psf.upfronthosting.co.za>
2015-05-02 17:15:11r.david.murraylinkissue24081 messages
2015-05-02 17:15:10r.david.murraycreate