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/044716.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 importNick Coghlan ncoghlan at iinet.net.au
Fri May 7 08:07:04 EDT 2004
Greg Ewing wrote:
> I can see your point of view. It just seems a bit strange coming at
> from the other direction -- if you can say 'import a.b as z' there
> doesn't seem to be any good reason not to say 'import ..a.b as z'. I
> can imagine people getting tripped up by this.
> 
> I guess you're right that it doesn't matter much either way.

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.

It's only once someone starts playing with the 'from' syntax for import 
that they need to know about the difference between absolute and 
relative import.

Regards,
Nick.

-- 
Nick Coghlan               |     Brisbane, Australia
Email: ncoghlan at email.com  | Mobile: +61 409 573 268

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