Load a module twice ... or not ???

Greg Ewing greg at cosc.canterbury.ac.nz
Tue Mar 21 23:06:16 EST 2000


pnpayne at swissonline.ch wrote:
> What mystified me in WvRA's book was the
> references to classes being defined twice. I mean, so what if they are???

You could get unexpected results from isinstance() tests,
or if you modify class attributes, or compare class objects.

In your case, the only thing that could go wrong is if you
compared two different versions of your function and expected
them to be the same. If you don't do that, there's no problem,
other than maybe using up a bit more memory with two copies
of the function.

-- 
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