[Python-Dev] New and Improved Import Hooks

Just van Rossum just@letterror.com
Thu, 5 Dec 2002 14:35:00 +0100


Guido van Rossum wrote:

> I fear that the requirement that all handlers are str subclasses
> raises the bar for writing a handler too much.  But maybe that's not a
> problem. 

/F's compromise to the rescue: the zipimporter will be a str subclass, but *any*
object is allowed. This makes sure that *we* don't break code, and makes it easy
for others to write import hooks (really really easy if they don't mind 3rd
party breakage, slightly less easy if they do, and somewhat less yet if they
must write it in C).

> So I hereby change my position to -0 on str subclass handlers, which
> means you can go ahead.

Ok.

Just