issubclass funny business

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Apr 12 21:25:20 EDT 2000


Michael Hudson wrote:
> 
> It'd be nice if when you `reload'ed
> modules that contain classes you could "smash" extant instances of
> those classes so that they were instances of the new class, but I
> can't for the life of me see how you might do this.

I can: when reloading a module containing a class
definition, and there is an existing definition of the
class, replace the contents of the existing class
object instead of making a new one.

Also, it seems to me that the "importing the main
module" problem could be solved by implementing the
running of a script from a file by means of importing
it.

-- 
Greg Ewing, Computer Science Dept,
+--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the Python-list mailing list