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/2004-May/044729.html below:

[Python-Dev] PEP 328: import...as with relative import

[Python-Dev] PEP 328: import...as with relative import [Python-Dev] PEP 328: import...as with relative importAahz aahz at pythoncraft.com
Sun May 9 21:44:09 EDT 2004
On Mon, May 10, 2004, Greg Ewing wrote:
> Nick Coghlan <ncoghlan at iinet.net.au>:
>> 
>> The other point in favour of the current way is that a bare import 
>> statement is *always* absolute, which further encourages absolute 
>> imports as the standard approach.
> 
> I don't understand why absolute imports should be regarded as the
> "standard approach". Absolute imports are appropriate for some things,
> relative imports are appropriate for other things. You can't say that
> one is "standard" and the other isn't.

The way I'd put it is that relative imports are used only by experts:
people building chunks of Python code large enough to require packages.
Therefore absolute imports make more sense as the default.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Adopt A Process -- stop killing all your children!

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