[Python-Dev] Python 2.3a1 release -- Dec 31

James C. Ahlstrom jim@interet.com
Fri, 27 Dec 2002 16:27:23 -0500


Just van Rossum wrote:
> From: "Samuele Pedroni" <pedronis@bluewin.ch>
>>it was considered a feature to be able to put
>>path/to/a.zip/python
>>in sys.path, so that the a.b package would be looked up under
>>path/to/a.zip/python/a/b.
> 
> PEP 273 doesn't document it as such; it only says it's needed for
> package imports.

The cornerstone of PEP 273 is Directory Equivalence, a zipped
directory must act like the directory.  And my implementation
does provide this feature.

> Also, to be honest, my implementation had some issues
> with that usage: it would look for the plain .zip archive in
> sys.path_importer_cache, which would obviously not be found, causing the
> zip file index to be read again for every package directory.

Mine reads the zip directory only once, and caches the whole
directory tree.  The payoff from the heavy mods to import.c, I guess.

JimA