A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-December/041078.html below:

[Python-Dev] Re: Python-Dev Digest, Vol 5, Issue 57

[Python-Dev] Re: Python-Dev Digest, Vol 5, Issue 57Edward Loper edloper at gradient.cis.upenn.edu
Tue Dec 16 15:17:49 EST 2003
Guido said:
> There is the remaining issue of what exactly the syntax would be.  I
> propose to extend the from clause to allow one or more dots before the
> dotted name, and to make the dotted name optional if at least one
> leading dot is found.  I propose not to change from-less import.

What's the motivation for restricting it to from-imports?  I suspect 
that this will cause confusion, and it doesn't feel self-consistent to 
me: why can you call a module ".foo" in one context, and not in 
another?  In particular, I think that if people see that you can do:

     from .foo import *

Then they'll assume that they can also do:

     import .foo

With the obvious semantics, i.e. equivalence to:

     from . import foo

What do we gain by not extending the syntax to from-less imports?

-Edward


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4