[Python-Dev] New and Improved Import Hooks
Just van Rossum
just@letterror.com
Thu, 5 Dec 2002 14:07:33 +0100
Sjoerd Mullender wrote:
> Instead of a regexp, I would suggest using a function that returns
> true if the hook can deal with the path component. This function
> could then use a regexp to determine whether it can. But this is
> about the same complexity as just calling the hook and let it return
> quickly if it can't deal with the path component.
>
> So this step would just become:
> 1. User programs register import hooks.
That's a great idea, but I think we should tackle this after 2.3 final is
released. It's orthogonal to the objects-on-sys.path-or-not dilemma, so can
easily be added later. The does-this-item-ends-with-.zip hack is good enough for
now.
Just