Popular recipes by Michael Hudson http://code.activestate.com/recipes/users/597580/2004-10-27T16:51:20-07:00ActiveState Code Recipesautomatically upgrade class instances on reload() (Python)
2004-10-27T16:51:20-07:00Michael Hudsonhttp://code.activestate.com/recipes/users/597580/http://code.activestate.com/recipes/160164-automatically-upgrade-class-instances-on-reload/
<p style="color: grey">
Python
recipe 160164
by <a href="/recipes/users/597580/">Michael Hudson</a>
.
Revision 3.
</p>
<p>Anyone who's used reload() on a module that defines a class in the interactive interpreter must have experienced the frustration of then running around and making sure that all instances are updated to be instances of the new rather than the old class.</p>
<p>This metaclass tries to help with this.</p>