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

[Python-Dev] Re: PEP 328 - Relative Imports

[Python-Dev] Re: PEP 328 - Relative ImportsBarry Warsaw barry at python.org
Mon Sep 13 03:40:32 CEST 2004
On Fri, 2004-09-10 at 18:51, Nicolas Fleury wrote:

> I agree with Guido.  FWIW, I think imports should be absolute by default 
> and that the statu quo is a mistake.  The __global__ solution makes 
> absolute imports too verbose, when they are usually in majority.  

I'm really not trying to argue strongly that __global__ is a solution,
but let me just point out that I think they wouldn't be that common. 
You'd add an __global__ only when the "normal" import statement didn't
do what you want, primarily because of a local module name that
conflicted with a global module, and you really wanted the global. 
Ordinarily, those conflicts don't occur.  OTOH, when they do, you can
often "fix" the problem by renaming your local module, but that's a bit
ugly.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040912/22303763/attachment.pgp
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