myfirstname at mylastname.com
Sun Jan 4 02:19:43 CET 2004
I have a couple of classes:
I want to subclass Base and Sub, i.e. define classes:
The inheritance looks like this:
But I'd really like it to look like this:
i.e. define Sub as "class Sub(X)", where I can change X at the time of
instantiation. Then I could define MySub as "class MySub(Sub(MyBase))".
(I hope that it's obvious that I'm looking for this effect, not this syntax)
Of course, someone is going to ask "why?"
I need to override a few members in Base. Sub is mostly fine as-is, so if I
could have MySub=Sub(MyMBase), that would be fine.
More information about the Python-list