Nick Coghlan <ncogh...@gmail.com> added the comment:

Sorry, that's not accurate - you have enough code in b.py to make the relative 
import work by convincing the interpreter it's actually being done in a package.

So what you're seeing in that regard is the fact that runpy is not any kind of 
sandbox - it shares process global state, including the import system, with all 
other modules. While the temporary module will be reverted automatically by 
runpy, any child imports will always remain visible in sys.modules, and any 
other side effects will remain in place (e.g. codec registrations).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15230>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to