[Import-SIG] Proposal for a lazy-loading finder

Nick Coghlan ncoghlan at gmail.com
Sun Jul 9 09:59:18 EDT 2017


On 9 July 2017 at 20:03, Antoine Pitrou <solipsis at pitrou.net> 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   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Import-SIG mailing list