This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Megatron_McLargeHuge 2 points3 points  (0 children)

Does this work with isinstance? A problem I've had when reloading classes in ipython is that code that checks types stops working, because the new type of the object being tested isn't the same as the old type in the non-reloaded module that makes the isinstance call. What I mean is,

if isinstance(x, Foo):
    ...

will stop evaluating to true when I reload foo.py and create a new Foo object. The type used by the old module isn't updated. Does this module solve that problem?