multiple extensions to a class

Peter Otten __peter__ at
Mon Jul 12 13:19:50 CEST 2004

Humpty Dumpty wrote:

>> class AB(A, B): pass
>> class ABC(A, B, C): pass
>> class AD(A, D): pass
> Which one offers "ABCD"?  Plus, as I just mentioned in a reply to another
> poster in this thread, B,C and D are discovered at run-time so anything
> based on class Something(derived from combination of A,B,C,D) is doomed
> since derivation is not dynamic.

The idea was that the classes you would actually use are arbitrary
combinations of "partial implementation" classes that bear no inheritance
Seems like I misunderstood your problem and you were after the technical
means to perform this combination at runtime. - Michele has just shown how
to achieve that with type().


More information about the Python-list mailing list