[Python-Dev] Relative vs. absolute imports (original) (raw)
M.-A. Lemburg mal at egenix.com
Mon May 17 11:15:24 EDT 2004
- Previous message: [Python-Dev] Relative vs. absolute imports
- Next message: [Python-Dev] Relative vs. absolute imports
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phillip J. Eby wrote:
I have a few questions about the PEP 328 which I'd like discussed:
* Why do we absolutely need to change the current scheme of 'local, then absolute' for name resolution ? Because there's no way to override the current scheme without calling import directly. Are you saying that you are not going to change the default import() implementation, only the way it is called ? (I wonder how you'll enforce the 'absolute only' strategy then) Huh? You lost me. What 'absolute only'? There's "from .x import y" still, and that's relative. As far as I know, nothing about import is changing, only the spelling of import statements.
If "import os" is supposed to map to an absolute import you will have to change the semantics of import because simply passing "os" to that API is going to implement the standard 'local, then absolute' import scheme.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, May 17 2004)
Python/Zope Consulting and Support ... http://www.egenix.com/ mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
EuroPython 2004, Göteborg, Sweden 20 days left
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
- Previous message: [Python-Dev] Relative vs. absolute imports
- Next message: [Python-Dev] Relative vs. absolute imports
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]