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

Alex alex at somewhere.round.here
Tue Mar 21 22:54:26 CET 2000

> B also runs as a main program in the same interpreter 'session' as A
> did, since I don't kill the interpreter between Apache requests, but I
> really don't see why I should have any problems. All the examples I've
> seen so far involve global variables in one form or another.  I don't
> use global variables except for performance reasons to cache database
> data between Apache requests and these globals are only set once. What
> mystified me in WvRA's book was the references to classes being
> defined twice. I mean, so what if they are???

Sorry, I guess explanation for why this hasn't hurt you was inaccurate.

Having classes defined twice can lead to confusing results if you use
class members to communicate between instances, though.  Sometimes,
that's a natural thing to do.


More information about the Python-list mailing list