Antoine Pitrou added the comment: Passing a globals() instance looks hackish. importlib uses another approach: http://hg.python.org/cpython/file/5ef49659935f/Lib/importlib/_bootstrap.py#l303
Note that it is a pity that code objects don't have a __module__ attribute. Perhaps it would be a nice feature for 3.4. ---------- nosy: +pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16778> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com