X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109 Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.glorb.com!news-xfer.nntp.sonic.net!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: Composition instead of inheritance References: X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney Date: Fri, 29 Apr 2011 07:38:56 +1000 Message-ID: <8762pykqdr.fsf@benfinney.id.au> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:SReHQVmcbtsMtiukz2ag9Bom4AI= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Lines: 18 Organization: Unlimited download news at news.astraweb.com NNTP-Posting-Host: be74926b.news.astraweb.com X-Trace: DXC=kHQZUk]Do8Bc3B4XnEnO9AL?0kYOcDh@JN7:H2`MmAUCS`HWH2Uf3?I]G;2>V^?kWCbEW9A[5UK?ENZ[SL`C\KgCY`1SigZBZ@B Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4272 Ethan Furman writes: > For anybody interested in composition instead of multiple inheritance, > I have posted this recipe on ActiveState (for python 2.6/7, not 3.x): > > http://code.activestate.com/recipes/577658-composition-of-classes-instead-of-multiple-inherit/ > > Comments welcome! It doesn't look like composition at all, though. I understand composition to be the setting of attributes on a class or instance; that recipe doesn't show it very well IMO. -- \ “[The RIAA] have the patience to keep stomping. They're playing | `\ whack-a-mole with an infinite supply of tokens.” —kennon, | _o__) http://kuro5hin.org/ | Ben Finney