[Python-Dev] Complexity of import.c

Jack Jansen Jack.Jansen@cwi.nl
Tue, 10 Dec 2002 11:15:15 +0100


On Monday, Dec 9, 2002, at 18:24 Europe/Amsterdam, James C. Ahlstrom 
wrote:
> I tried my best not to break the Macintosh port, which has
> a lot of special code.  A replacement import.c should do
> the same.

Actually, if the new improved import has the right set of hooks then 
the macintosh stuff can go away. 90% of it does basically the same as 
what zip-import does: it allows you to put files on sys.path and looks 
in those files for modules. The mumbo-jumbo about interning sys.path 
strings is so the code can cache whether a sys.path entry is a file or 
a directory, without that normal imports were slowed down by 30% or so.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -