[Python-Dev] Draft: PEP for imports (original) (raw)
Batista, Facundo FBatista at uniFON.com.ar
Tue Jan 20 11:02:14 EST 2004
- Previous message: [Python-Dev] dict.addlist()
- Next message: [Python-Dev] Draft: PEP for imports
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Aahz wrote:
#- Here are the contenders: #- #- from .foo import #- #- from ...foo import
I think the following idea maybe is too radical, but well...
I don't use packages, but when I read the tutorial first time, I wondered why, if the packages appeared to solve a 'pack into a directory' problem, the names were joined with '.' instead of '/'. Later I found some other uses to the 'unix path' notation.
For example:
Module inside a package: import package/module
Relative import: import ../../otherpack/webmodules/somemodule
Importing a personal module when you have a program in several places but not enough permission to write in the site-packages directory: import /home/facundo/python/modules/myModule (you can do this with "import sys" and "sys.path.append('...')", but seems an overhead to me).
Regards,
. Facundo
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ADVERTENCIA
La información contenida en este mensaje y cualquier archivo anexo al mismo, son para uso exclusivo del destinatario y pueden contener información confidencial o propietaria, cuya divulgación es sancionada por la ley.
Si Ud. No es uno de los destinatarios consignados o la persona responsable de hacer llegar este mensaje a los destinatarios consignados, no está autorizado a divulgar, copiar, distribuir o retener información (o parte de ella) contenida en este mensaje. Por favor notifíquenos respondiendo al remitente, borre el mensaje original y borre las copias (impresas o grabadas en cualquier medio magnético) que pueda haber realizado del mismo.
Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Telefónica Comunicaciones Personales S.A. o alguna empresa asociada.
Los mensajes electrónicos pueden ser alterados, motivo por el cual Telefónica Comunicaciones Personales S.A. no aceptará ninguna obligación cualquiera sea el resultante de este mensaje.
Muchas Gracias. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20040120/d998a541/attachment.html
- Previous message: [Python-Dev] dict.addlist()
- Next message: [Python-Dev] Draft: PEP for imports
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]