On 12/10/07, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Jim Jewett wrote:
>  > I had thought that wouldn't be run until the module was otherwise
> > loaded.  Are you saying that just creating the callback forces a load
> > under lazy loading, but not under post-load hooks?

> I was saying that the problem can't be solved with lazy imports.

Let me rephrase.

You seem to be treating lazy imports and post-import hooks as two
independent binary choices, so that there are four logical
possibilities.

I don't see any point to supporting post-load hooks *without* lazy
importing, so to me, only three of those possibilities make sense.
(neither, lazy only, lazy+postimport)

Is there an example where you would use post-import hooks even though
the system didn't support lazy import?  The best I can come up with is
"Don't import module X just for me, but *if* someone else imports it,
then I want to do these things to/with it."

This still sounds like a (kind of) lazy import to me.  Are you
considering that not-even-a-lazy-import because you care about even
indirect usage?

-jJ
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to