Is there a way to specify a superclass at runtime?
R.Brodie at rl.ac.uk
Mon Oct 5 15:44:58 CEST 2009
"Chris Colbert" <sccolbert at gmail.com> wrote in message
news:mailman.868.1254748945.2807.python-list at python.org...
> 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