<br><div><span class="gmail_quote">On 4/7/06, <b class="gmail_sendername">Nick Coghlan</b> <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It would be nice if this chain could instead be written as:<br><br> from stringio or cStringIO or StringIO import StringIO<br><br>Similar to PEP 341, this could be pure syntactic sugar, with the actual<br>try-except statements generated in the AST.
</blockquote><div><br>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. ;)
<br></div></div><br>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!