A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-May/044758.html below:

[Python-Dev] PEP 328 and __import__ contract

[Python-Dev] PEP 328 and __import__ contract [Python-Dev] PEP 328 and __import__ contractSamuele Pedroni pedronis at bluewin.ch
Tue May 11 15:45:00 EDT 2004
PEP 328 seems at the moment to only describe the syntactic, surface and 
as-seen-by-the-user
aspects of the new behavior for absolute/relative imports.

What is going to happen to __import__ hook?

At the moment relative imports as the default are implemented at that level,
through get_parent and the first load_next in import_module_ex which is 
exported as __import__.

Will imports still be implemented in terms of/on top of __import__.

What will be the contract for __import__ then?
I suppose it could be kept the same, relaxing over time the obligation to 
implement
relative imports. At the moment a __import__ hook can be forced in absolute 
import mode
by passing an empty globals dict.

I think the PEP should cover some of this.

regards.



More information about the Python-Dev mailing list

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