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/2002-December/030930.html below:

[Python-Dev] Another approach for the import mechanism

[Python-Dev] Another approach for the import mechanism [Python-Dev] Another approach for the import mechanismGordon McMillan gmcm@hypernet.com
Fri, 6 Dec 2002 12:11:32 -0500
On 6 Dec 2002 at 12:18, Martin v. L=F6wis wrote:

> - Wait for YAGNI (yet another great new
> infrastructure), to invoke all hooks on all sys.path
> items; this would give backwards compatibility
> (sys.path could continue to be a list of strings),
> extensibility (you could add new strings to
> sys.path, yet the hooks would honor them),
> feature-richness (you can implement a .py.bz2
> importer), and slowness (for invoking every hook on
> every sys.path item). 

A .py.bz2 importer is an example of what Greg 
Stein called a "suffix importer". That's orthogonal
to "path importer"s. I omitted "suffix importer"s from
iu, precisely because of the slowness. If you 
limit yourself to hooking nodes on sys.path (or
on __path__), a pure Python __import__ can
beat the builtin import (if you use efficient
archives).

-- Gordon
http://www.mcmillan-inc.com/




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