[Python-Dev] Re: PEP 328 -- relative and multi-line import

Aahz aahz at pythoncraft.com
Wed Apr 7 00:53:18 EDT 2004

On Wed, Apr 07, 2004, Greg Ewing wrote:
> Aahz <aahz at pythoncraft.com>:
>> Greg:
>>> Would it be unreasonable to define "." as meaning the current
>>> *package*, rather than the current *module* --
>> Not unreasonable, but I think it complicates the explanation. 
> Not if the explanation simply says "'.' refers to the current
> package", and leaves the reader to deduce what "current package" means
> when the module is not a package. :-) [1]

All right, let's try this:

    A leading dot indicates a relative import, starting with the current
    package.  Two or more leading dots point to the parent(s) of the
    current package, one level per dot after the first.

Then the examples should explain the meaning well enough.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Why is this newsgroup different from all other newsgroups?

More information about the Python-Dev mailing list