Brett Cannon added the comment: To answer a couple of Barry's comments in reply to Eric...
__package__ should be set to the empty string if I'm reading PEP 362 correctly (and importlib isn't broken): "When the import system encounters an explicit relative import in a module without __package__ set (or with it set to None), it will calculate and store the correct value (__name__.rpartition('.')[0] for normal modules and __name__ for package initialisation modules". If someone sets __package__ to None, then importlib fills it in as necessary. As for the diagram(s), I have attached the overall PDF that I still have from my original Omnifgraffle file (which I don't have a license to anymore) that I built my PyCon 2008 presentation with. It's probably outdated at this point. I will have to redo them for my PyCon Argentina/Brasil (maybe US?) import talks anyway. ---------- Added file: http://bugs.python.org/file26606/__import__.pdf _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15295> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com