[Python-3000] Interest in PEP for callbacks on module import
Guido van Rossum
guido at python.org
Mon Dec 10 22:47:32 CET 2007
FWIW I just modified decimal to import numbers and made Decimal
inherit from Inexact and Real. No impact whatsoever.
--Guido
On Dec 10, 2007 1:38 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Paul Moore wrote:
> > On 10/12/2007, Jim Jewett <jimjjewett at gmail.com> wrote:
> >
> >>"Don't import module X just for me, but *if* someone else imports it,
> >>then I want to do these things to/with it."
> >
> > That sounds to me exactly like the registration use case Christian mentioned:
> >
> > Register decimal.Decimal as a "ABC.Number" type - but don't import
> > decimal just so that I can do this,
>
> I think the point is that you could just as well
> achieve this by lazily importing decimal with a
> callback.
>
> --
> Greg
>
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list