Nick Coghlan added the comment: Right, there's a longstanding RFE to allow builtin packages and submodules: https://bugs.python.org/issue1644818
At the moment, modules like pyexpat are more like the os module than they are packages: they eagerly set other modules as attributes at import time (akin to os.path), rather than defining an actual package with submodules that can be optionally loaded via the import system. Given the import system changes in recent 3.x releases, I'd expect it to be feasible (but not necessarily easy) to come up with a viable specification and implementation for builtin and extension packages that work similarly to traditional packages (perhaps based on the handling of frozen packages). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29830> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com