reloading modules and isinstance()
Diez B. Roggisch
deets at nospam.web.de
Fri Dec 14 13:19:20 EST 2007
Tlis schrieb:
> Hi,
>
> I have found that it is possible to reassign the instance.__class__
> reference to the same class (but after reloading) to make the
> isinstance() test work again! I know that it is a kind of hacking of
> the Python interpreter, but it works :-)
It's not especially "hacking" (albeit certainly not a common thing to
do). But it of course will only work for instances you are _aware_ of.
Diez
More information about the Python-list
mailing list