multiple extensions to a class

Peter Otten __peter__ at web.de
Mon Jul 12 07:19:50 EDT 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
relationships.
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().

Peter




More information about the Python-list mailing list