A RetroSearch Logo

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

Search Query:

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

[Python-Dev] Re: Relative import

[Python-Dev] Re: Relative import [Python-Dev] Re: Relative importJohn J Lee jjl at pobox.com
Wed Dec 17 18:08:17 EST 2003
On Wed, 17 Dec 2003, Werner Schiendl wrote:
[...]
> There should be some solution about from-less import however, to support the
> fully-qualified name syntax. For example, I prefer writing "struct.pack"
> over writing just "pack" because it is more explicit to the reader what
> happens. Or e. g. os.path.split is another example.

Yes.


> Maybe just omit the dots for the name?

As Guido pointed out, it would be a shame to break the rule that 'import
x' currently lets you refer to plain old 'x'.  And it would be ugly to
have '.x' appear in programs, I think (and Guido mentioned with
statements, though maybe he's kidding about that).

So, why not this?

from ... import x


John

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