<br><br><div class="gmail_quote">On Tue, Mar 18, 2008 at 8:32 AM, Guido van Rossum &lt;<a href="mailto:guido@python.org">guido@python.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I don&#39;t recall the reason; it may simply be due to the complexity, or<br>
possibly it would have made the _import__ API even uglier.<br>
</blockquote><div><br>I don&#39;t recall any such issues, and I can&#39;t imagine them now. The &#39;.&#39; is resolved before the fromlist is even considered, and is just a way to find the right package to import from. Importing &#39;*&#39; instead of a set of names should not be a problem.<br>
&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I&#39;m fine with removing the restriction; your use case is compelling.<br>
<div><div></div><div class="Wj3C7c"><br>
On Tue, Mar 18, 2008 at 10:23 AM, &quot;Martin v. Löwis&quot; &lt;<a href="mailto:martin@v.loewis.de">martin@v.loewis.de</a>&gt; wrote:<br>
&gt; When I do a relative star import, I current get<br>
&gt;<br>
&gt; &nbsp;SyntaxError: &#39;import *&#39; not allowed with &#39;from .&#39;<br>
&gt;<br>
&gt; &nbsp;What&#39;s the reason for this restriction?<br>
&gt;<br>
&gt; &nbsp;Is it ok to remove it?<br>
&gt;<br>
&gt; &nbsp;I encountered the issue while porting Django. In<br>
&gt; &nbsp;django/newforms/__init__.py, they do<br>
&gt;<br>
&gt; &nbsp;from widgets import *<br>
&gt; &nbsp;from fields import *<br>
&gt; &nbsp;from forms import *<br>
&gt; &nbsp;from models import *<br>
&gt;<br>
&gt; &nbsp;In 3k, that needs to change to<br>
&gt;<br>
&gt; &nbsp;from .widgets import *<br>
&gt; &nbsp;from .fields import *<br>
&gt; &nbsp;from .forms import *<br>
&gt; &nbsp;from .models import *<br>
&gt;<br>
&gt; &nbsp;but that still won&#39;t work because of the syntax<br>
&gt; &nbsp;error. One solution would be to make the import<br>
&gt; &nbsp;explicit, but that is tedious and unmaintainable.<br>
&gt; &nbsp;E.g. for the widgets line, it would be<br>
&gt;<br>
&gt; &nbsp;from .widgets import (Widget, TextInput, PasswordInput,<br>
&gt; &nbsp; &nbsp; &nbsp;HiddenInput, MultipleHiddenInput,<br>
&gt; &nbsp; &nbsp; &nbsp;FileInput, DateTimeInput, Textarea, CheckboxInput,<br>
&gt; &nbsp; &nbsp; &nbsp;Select, NullBooleanSelect, SelectMultiple, RadioSelect,<br>
&gt; &nbsp; &nbsp; &nbsp;CheckboxSelectMultiple, MultiWidget, SplitDateTimeWidget)<br>
&gt;<br>
&gt; &nbsp;Regards,<br>
&gt; &nbsp;Martin<br>
&gt; &nbsp;_______________________________________________<br>
&gt; &nbsp;Python-3000 mailing list<br>
&gt; &nbsp;<a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br>
&gt; &nbsp;<a href="http://mail.python.org/mailman/listinfo/python-3000" target="_blank">http://mail.python.org/mailman/listinfo/python-3000</a><br>
</div></div>&gt; &nbsp;Unsubscribe: <a href="http://mail.python.org/mailman/options/python-3000/guido%40python.org" target="_blank">http://mail.python.org/mailman/options/python-3000/guido%40python.org</a><br>
&gt;<br>
<font color="#888888"><br>
<br>
<br>
--<br>
--Guido van Rossum (home page: <a href="http://www.python.org/%7Eguido/" target="_blank">http://www.python.org/~guido/</a>)<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
Python-3000 mailing list<br>
<a href="mailto:Python-3000@python.org">Python-3000@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-3000" target="_blank">http://mail.python.org/mailman/listinfo/python-3000</a><br>
Unsubscribe: <a href="http://mail.python.org/mailman/options/python-3000/thomas%40python.org" target="_blank">http://mail.python.org/mailman/options/python-3000/thomas%40python.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thomas Wouters &lt;<a href="mailto:thomas@python.org">thomas@python.org</a>&gt;<br><br>Hi! I&#39;m a .signature virus! copy me into your .signature file to help me spread!