[Python-Dev] module aliasing (original) (raw)

Thomas Wouters thomas at python.org
Fri Apr 7 15:12:59 CEST 2006


On 4/7/06, Nick Coghlan <ncoghlan at gmail.com> wrote:

It would be nice if this chain could instead be written as:

from stringio or cStringIO or StringIO import StringIO Similar to PEP 341, this could be pure syntactic sugar, with the actual try-except statements generated in the AST.

It could, but it's probably easier to make the IMPORT_NAME (and possibly IMPORT_FROM) opcodes take more names from the stack, and do it all in the C code for the opcodes. And import could be changed to accept a sequence of modules (it takes keyword arguments now, anyway. ;)

-- Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060407/2e1c58a1/attachment.html



More information about the Python-Dev mailing list