[Python-Dev] Relative import

Guido van Rossum guido at python.org
Wed Dec 17 23:48:08 EST 2003

> > I cannot accept scan-up as default
> In that case, it's probably better not to have it at all,
> and I'd go for your first proposal. One leading dot seems
> to stand out pretty well to my eyes -- more is not necessary.

But you're okay with two or more dots for extra levels up, right?

(Note that this leading-dot algorithm is nearly the same as the old
MacOS pathname syntax, except they did it with colons: :foo was foo in
the current directory, ::foo was foo in the parent directory, etc.,
and foo:bar was an absolute pathname.  The only difference is that for
backwards compatibility reasons they interpreted no colons as relative
to the current directory rather than absolute.)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list