Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31104
| From | Dieter Maurer <dieter@handshake.de> |
|---|---|
| Subject | Re: Private methods |
| Date | 2012-10-11 08:04 +0200 |
| References | (4 earlier) <mailman.2012.1349802524.27098.python-list@python.org> <5074b86b$0$6574$c3e8da3$5496439d@news.astraweb.com> <mailman.2016.1349828799.27098.python-list@python.org> <1krqopm.19fo57y1wri8yaN%real-not-anti-spam-address@apple-juice.co.uk> <aced18f9-785e-4bb6-a403-2203044a4ec7@p5g2000pbs.googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2041.1349935503.27098.python-list@python.org> (permalink) |
alex23 <wuwei23@gmail.com> writes: > On 10 Oct, 17:03, real-not-anti-spam-addr...@apple-juice.co.uk (D.M. > Procida) wrote: >> It certainly makes it quick to build a class with the attributes I need, >> but it does make tracing logic sometimes a pain in the neck. >> >> I don't know what the alternative is though. > > Components. > > The examples are in C++ and it's about game development, but I found > this article to be very good at explaining the approach: > http://gameprogrammingpatterns.com/component.html > > I've become a big fan of components & adaptation using zope.interface: > http://wiki.zope.org/zope3/ZopeGuideComponents If multiple inheritance is deemed complex, adaptation is even more so: With multiple inheritance, you can quite easily see from the source code how things are put together. Adaptation follows the "inversion of control" principle. With this principle, how a function is implemented, is decided outside and can very easily be changed (e.g. through configuration). This gives great flexibility but also nightmares when things do not work as expected...
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Private methods real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) - 2012-10-09 14:24 +0100
Re: Private methods Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-09 14:51 +0100
Re: Private methods real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) - 2012-10-09 14:59 +0100
Re: Private methods Demian Brecht <demianbrecht@gmail.com> - 2012-10-09 07:08 -0700
Re: Private methods Robert Kern <robert.kern@gmail.com> - 2012-10-09 15:12 +0100
Re: Private methods Tim Chase <python.list@tim.thechases.com> - 2012-10-09 09:21 -0500
Re: Private methods Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-09 11:08 -0600
Re: Private methods Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-09 23:51 +0000
Re: Private methods Demian Brecht <demianbrecht@gmail.com> - 2012-10-09 17:26 -0700
Re: Private methods real-not-anti-spam-address@apple-juice.co.uk (D.M. Procida) - 2012-10-10 08:03 +0100
Re: Private methods alex23 <wuwei23@gmail.com> - 2012-10-10 18:34 -0700
Re: Private methods Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-11 02:08 +0000
Re: Private methods Dieter Maurer <dieter@handshake.de> - 2012-10-11 08:04 +0200
Re: Private methods Robert Kern <robert.kern@gmail.com> - 2012-10-10 13:47 +0100
Re: Private methods Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-01 16:45 -0600
Re: Private methods Roy Smith <roy@panix.com> - 2012-10-10 09:08 -0400
Re: Private methods Ramchandra Apte <maniandram01@gmail.com> - 2012-10-10 08:56 -0700
Re: Private methods Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-10 17:13 +0100
Re: Private methods Grant Edwards <invalid@invalid.invalid> - 2012-10-10 16:30 +0000
Re: Private methods alex23 <wuwei23@gmail.com> - 2012-10-10 18:39 -0700
Re: Private methods 88888 Dihedral <dihedral88888@googlemail.com> - 2012-10-10 20:11 -0700
csiph-web