[Python-Dev] Relative import

Batista, Facundo FBatista at uniFON.com.ar
Tue Dec 16 13:37:39 EST 2003

Guido van Rossum wrote:

#- There is the remaining issue of what exactly the syntax would be.  I
#- propose to extend the from clause to allow one or more dots 
#- before the
#- dotted name, and to make the dotted name optional if at least one
#- leading dot is found.  I propose not to change from-less import.

Don't know the restrictions, as never used the package feature in modules,
but seems natural to me to use the same syntax that in a unix filesystem
(maybe without the '/'?). 

This way, you can reference a module in your level, in an upper level,

.	Facundo

More information about the Python-Dev mailing list