[Python-Dev] Built-in sub modules (original) (raw)

Brett Cannon brett at python.org
Tue Jun 12 16:54:02 CEST 2012


On Mon, Jun 11, 2012 at 11:37 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:

On Tue, Jun 12, 2012 at 1:17 PM, Albert Zeyer <albzey at googlemail.com> wrote: > I also searched a bit around and I didn't directly found any easier > way to do this. Only a post from 2009 > (http://mail.python.org/pipermail/cplusplus-sig/2009-January/014178.html ) > which seems like a much more ugly hack.

Right, it isn't currently supported. http://bugs.python.org/issue1644818 is a long standard feature request to add this functionality. For Python 3.3, the old import system (written in C) has been replaced with importlib (written in Python). This should make it easier to extend and experiment with builtin submodule support. An importlib based solution should also work in Python 3.2. Further discussions would be best directed to import-sig, until an importlib based solution is available for consideration.

I actually had code to make extensions modules work in packages as well, but removed it when it broke "compatibility". -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120612/27e769b4/attachment.html>



More information about the Python-Dev mailing list