New+old-style multiple inheritance
Jonathan Gardner
jgardner.jonathangardner.net at gmail.com
Tue Dec 18 14:09:38 EST 2007
On Dec 18, 7:08 am, "stephen... at googlemail.com"
<stephen... at googlemail.com> wrote:
> We are trying to monkey-patch a third-party library that mixes new and
> old-style classes with multiple inheritance. In so doing we have
> uncovered some unexpected behaviour:
>
<snip>
>
> I know this level of messing with python internals is a bit risky but
> I'm wondering why the above code doesn't work.
>
You've already discovered why--you're mixing old and new style
classes.
Monkey patching is definitely unpythonic. You must be a Ruby guy. Why
don't you try doing something else to get the behavior you want,
something more explicit?
More information about the Python-list
mailing list