Dynamically Changing the Base Class

Michele Simionato michele.simionato at gmail.com
Mon Jul 7 23:44:57 EDT 2008


On Jul 7, 8:08 pm, "Adam C." <adam... at gmail.com> wrote:
> Thanks. I think we would want new-style classes, and 6-year-old
> patches strike me as maybe a little out of the desired path... so this
> really just doesn't work in modern Python?

Can you use (multiple) inheritance instead of changing the bases?
Alternatively, try using an old-style class, changing the bases
and subclassing it inheriting from object too:

class NewStyle(OldStyle, object):
  pass




More information about the Python-list mailing list