[Python-Dev] New and Improved Import Hooks

David Ascher DavidA@ActiveState.com
Wed, 04 Dec 2002 15:49:34 -0800


Samuele Pedroni wrote:

> I would it support this kind of code:
>
> sys.path = L
> L.append(...) ?

Sure -- sys.path wouldn't be a "real" list object, just one that behaved as one.

Just:

 > How is this different (besides being more complex <wink>) from making
 > import hooks string subclasses?

It doesn't require the import hook to be a string subclass, which you said was 
hard to do if the import hook is to be written in C.  If making it easy to 
write a C import hook isn't a requirement anymore, let me know!

--david