Is there a way to specify a superclass at runtime?

Richard Brodie R.Brodie at
Mon Oct 5 15:44:58 CEST 2009

"Chris Colbert" <sccolbert at> wrote in message 
news:mailman.868.1254748945.2807.python-list at

> I am trying to abstract this machinery in a single class called
> Controller which I want to inherit from either SimController or
> RealController based on whether a module level flag SIMULATION is set
> to True or False.

At first sight, that seems kind of odd. Wouldn't it be simpler to have
SimController and RealController inherit from Controller? 

More information about the Python-list mailing list