2.2 open
Christian Tanzer
tanzer at swing.co.at
Mon Mar 25 03:22:41 EST 2002
Greg Ewing <greg at cosc.canterbury.ac.nz> wrote:
> Robin Becker wrote:
> >
> > So the question now is, how do I tell if __import__ is the built in one
> > even if the import system is not fully initialized.
>
> You could compare its type with what you really
> should have been comparing it with in the
> first place:
>
> import types
> if type(__import__) == types.BuiltinFunctionType:
> ...
Curious what you'll say about
you-really-should-have-been-comparing-it-with-in-the-first-place
when `__import__` evolves into a type itself <3/4 wink>.
Despite-the-righteousness-your-advice-is-sound-though-ly yr's
--
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list
mailing list