Re: Proposal for a lazy-loading finder

Nick Coghlan <[email protected]> Sun, 9 Jul 2017 23:59:18 +1000
Newsgroups gmane.comp.python.import
Message-ID <CADiSq7cVVhT=8N-voOLc8JAUzQDgOSwEhcmpqccKxbsFvk0nug@mail.gmail.com>
On 9 July 2017 at 20:03, Antoine Pitrou <[email protected]> wrote:
> I would suggest allow people to fully customize the blacklist /
> whitelist logic using a callable (because looking up by fullname is a
> bit inflexible).

Oh, I like that - and then we'd have "ensure_lazy" and "ensure_eager"
as callback factories that accepted a predefined list of names.

I think this is going to be one of the key changes in going from
"utility a project implements for itself if it needs it" to "general
purpose language level facility" - I could easily see the simple
predefined list approach working for a *particular* project, but I
think once we open this capability up to all Python users (rather than
only those that are comfortable with customising the import system at
runtime) it will prove to be inadequate.

Cheers,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia