Needed: Real-world examples for Python's Cooperative Multiple Inheritance

Sol Toure sol2ray at gmail.com
Tue Nov 30 10:03:26 EST 2010


Most of the examples presented here can use the "decorator pattern" instead.
Especially the window system


On Mon, Nov 29, 2010 at 5:27 PM, Gregory Ewing
<greg.ewing at canterbury.ac.nz>wrote:

> Paul Rubin wrote:
>
>  The classic example though is a window system, where you have a "window"
>> class, and a "scroll bar" class, and a "drop-down menu" class, etc. and
>> if you want a window with a scroll bar and a drop-down menu, you inherit
>> from all three of those classes.
>>
>
> Not in any GUI library I've ever seen. Normally there would
> be three objects involved in such an arrangement, a Window,
> a ScrollBar and a DropDownMenu, connected to each other in
> some way.
>
> --
> Greg
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.afroblend.com
African news as it happens.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101130/c1571b73/attachment.html>


More information about the Python-list mailing list