A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/1999-September/000971.html below:

[Python-Dev] Towards a Python based import scheme

[Python-Dev] Towards a Python based import schemeGordon McMillan gmcm@hypernet.com
Thu, 16 Sep 1999 13:38:03 -0400
Jim Ahlstrom wrote:

> As a result of all this import discussion I am a bit worried that
> the python library *.pyl file format may not be powerful enough.
> I have always thought in terms of unique top-level names and a
> format which supports import of modules and packages.  But this
> does not support the full functionality of PYTHONPATH.  For
> example, PYTHONPATH can (and is) used to select the correct
> plat-* directory files.  And the format may not support Jim
> Fulton's fancy local import scheme.  And what if someone invents
> a third thing to import besides a module or a package? 
> PYTHONPATH is not going away nor should it.

The central idea of imputil is that an importer is responsible for 
one little chunk of turf. If the desired module / package isn't 
"his", he just passes the request on to the next element in the 
chain.

So I don't think there's a need for one canonical do-everything 
importer (or archive format). PYTHONPATH is outside any 
particular importer. Effectively, you can use a chain of 
importers to replace PYTHONPATH. So the platform specific 
modules might be found by one particular importer. In other 
words, I think it's more effective to specialize individual 
importers and chain them up than it is to try to create an 
overly-generalized importer.
 


- Gordon



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