On Sat, Apr 03, 2004, Guido van Rossum wrote: >Aahz: >> >> (I think the PEP makes that clear). You could, however, do >> >> from ... import package [as foo] >> >> if Guido permits it; I want a Pronouncement on that before adding it >> to the PEP. > > Yes, even if ... refers to the root package (but not if it tries to > reach beyond that). Great! Then PEP 328 is almost set except for Bernhard's wish for more clarification of the rationale for making the default import absolute. I've gone ahead and updated the PEP, and I think we should move forward on implementation even without the clarification, but I've stuck a note in my calendar to bug people regularly until the rationale is finished. I've added the following: Timeline ======== In Python 2.4, you must enable the new absolute import behavior with :: from __future__ import absolute_import You may use relative imports freely. In Python 2.5, any ``import`` statement that results in an intra-package import will generate a ``PendingDeprecation`` warning (this also applies to ``from <> import`` that fails to use the relative import syntax). In Python 2.6, ``import`` will always be an absolute import. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "usenet imitates usenet" --Darkhawk
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4