On 3/15/06, guido.van.rossum [EMAIL PROTECTED] wrote:
Use relative imports in a few places where I noticed the need.(Ideally, all packages in Python 2.5 will use the relative importsyntax for all their relative import needs.)You should be aware that using relative imports (or absolute imports) in
Well, absolute imports without the future statement will not use the
5th argument, so they won't break, right? That's what MAL also says.
Someone please fix this.
On 3/15/06, Thomas Wouters [EMAIL PROTECTED] wrote:
On 3/15/06, guido.van.rossum [EMAIL PROTECTED] wrote:
Use relative imports
At 10:33 AM 3/15/2006 -0800, Guido van Rossum wrote:
Well, absolute imports without the future statement will not use the
5th argument, so they won't break, right? That's what MAL also says.
Someone please fix this.
Why is a 5th argument needed to do absolute imports? Shouldn't it suffice
to
Because Thomas designed it this way. :-)
I believe his design makes sense though: import foo translates to
__import__(foo, ...).
There's a separate setting, only known to the compiler, that says
whether from __future__ import absolute_import is in effect (there's
no way to slip a flag into
At 01:34 PM 3/15/2006 -0800, Guido van Rossum wrote:
Because Thomas designed it this way. :-)
I believe his design makes sense though: import foo translates to
__import__(foo, ...).
There's a separate setting, only known to the compiler, that says
whether from __future__ import absolute_import
On 3/15/06, Phillip J. Eby [EMAIL PROTECTED] wrote:
Ah, so it's *relative* imports that require a 5th argument. I was thinking
it was there to support absolute imports. I was thinking that relative
imports could be implemented by popping bits off of __name__ to get an
absolute location.
On 3/15/06, Guido van Rossum [EMAIL PROTECTED] wrote:
Well, absolute imports without the future statement will not use the
5th argument, so they won't break, right? That's what MAL also says.
Someone please fix this.
I'd much rather see us change imports to use absolute imports than to
use
On Wed, 2006-03-15 at 17:33 -0500, Jeremy Hylton wrote:
On 3/15/06, Guido van Rossum [EMAIL PROTECTED] wrote:
Well, absolute imports without the future statement will not use the
5th argument, so they won't break, right? That's what MAL also says.
Someone please fix this.
I'd much rather
Done.
Index: pep-0008.txt
===
--- pep-0008.txt(revision 42952)
+++ pep-0008.txt(working copy)
@@ -156,8 +156,9 @@
- Relative imports for intra-package imports are highly discouraged.
Always use the