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/041076.html below:

[Python-Dev] Re: Relative import

[Python-Dev] Re: Relative import [Python-Dev] Re: Relative importWerner Schiendl ws-news at gmx.at
Tue Dec 16 14:53:10 EST 2003
Hi,

"Guido van Rossum" <guido at python.org> wrote

> A lot people have presented a good case for relative imports.  Nobody
> has argued to keep the status quo (where imports are ambiguous about
> whether they are meant to be absolute or relative).  So I suggest that
> in 2.4, we introduce the leading dot notation for relative import,
> while still allowing relative import without a leading dot.

I'm +1 on it, I'd only wish an additional

from __future__ import strict_import

(or whatever seems a better name)

to allow a module to indicate that every not explicitly relative import
should be absolute.

This would allow module authors to be explicit from the start and it is also
a safety net
against accidentially adding a relative module with the name of some
absolute one.


best regards
Werner





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