Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #64694
| References | (1 earlier) <8fde6d34-47c5-49a1-a6d0-9ffe3df2d401@googlegroups.com> <CAPTjJmokZUHta7Y3x_=6eUjKpv2Td2iaqro1su7NuLo+gfzwag@mail.gmail.com> <lbtb9r$ljd$1@ger.gmane.org> <CAPTjJmo+EuY439wB0C8or+ZAcYeNR844HAKwL3i2+55dDE8LNA@mail.gmail.com> <20140124162842.0E73240FC2@wycliff.ceplovi.cz> |
|---|---|
| Date | 2014-01-25 03:33 +1100 |
| Subject | Re: Python declarative |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5948.1390581211.18130.python-list@python.org> (permalink) |
On Sat, Jan 25, 2014 at 3:28 AM, Matěj Cepl <mcepl@redhat.com> wrote: > On 2014-01-24, 11:18 GMT, you wrote: >> Write your rendering engine as a few simple helper functions, >> and then put all the rest in as code instead of XML. The >> easiest way to go about it is to write three forms, from >> scratch, and then look at the common parts and figure out >> which bits can go into helper functions. > > Perhaps what's missing is full acknowledgment that Python has > dual-inheritance and thus it can have mixin classes (which seems > to me to be the only useful use of dual inheritance). You know > you can have mixins in Python, right? Hmm, I've never really felt the need to work that way. Usually it's functions I want, not classes; but if they're classes, then generally they're just to add a couple of methods, or change the construction args, so single inheritance is plenty. (I created a MultiLineEntryField class as a thin wrapper around TextView, adding get_text() and set_text() with the same signatures as GTK2.Entry()'s methods of the same names. That wouldn't apply to anything else, so a mixin wouldn't help much.) But sure. If you want mixins, go for it. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python declarative Sergio Tortosa Benedito <sertorbe@gmail.com> - 2014-01-15 18:02 +0100
Re: Python declarative Francesco Bochicchio <bieffe62@gmail.com> - 2014-01-17 06:22 -0800
Re: Python declarative Francesco Bochicchio <bieffe62@gmail.com> - 2014-01-19 23:25 -0800
Re: Python declarative sertorbe@gmail.com - 2014-01-17 06:47 -0800
Re: Python declarative Tim Roberts <timr@probo.com> - 2014-01-18 13:13 -0800
Re: Python declarative sertorbe@gmail.com - 2014-01-19 02:27 -0800
Re: Python declarative sertorbe@gmail.com - 2014-01-22 12:38 -0800
Re: Python declarative Asaf Las <roegltd@gmail.com> - 2014-01-22 13:16 -0800
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-23 13:29 +1100
Re: Python declarative Terry Reedy <tjreedy@udel.edu> - 2014-01-22 23:08 -0500
Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-24 11:21 +0200
Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-24 01:53 -0800
Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-24 15:06 +0200
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-24 22:18 +1100
Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-24 14:49 +0200
Re: Python declarative Burak Arslan <burak.arslan@arskom.com.tr> - 2014-01-24 15:40 +0200
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-25 00:55 +1100
Re: Python declarative Matěj Cepl <mcepl@redhat.com> - 2014-01-24 17:28 +0100
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-25 03:33 +1100
Re: Python declarative sertorbe@gmail.com - 2014-01-24 10:51 -0800
Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-25 09:18 +0200
Re: Python declarative Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 02:33 +0000
Re: Python declarative Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-26 02:45 +0000
Re: Python declarative Asaf Las <roegltd@gmail.com> - 2014-02-02 18:17 -0800
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-26 14:38 +1100
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-26 15:06 +1100
Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-25 20:47 -0800
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-26 16:23 +1100
Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-26 00:05 -0800
Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-26 11:12 +0200
Re: Python declarative Rustom Mody <rustompmody@gmail.com> - 2014-01-26 06:36 -0800
Re: Python declarative Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 12:05 +0000
Re: Python declarative "Frank Millman" <frank@chagford.com> - 2014-01-26 08:03 +0200
Re: Python declarative Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-01-26 12:21 +0000
Re: Python declarative Chris Angelico <rosuav@gmail.com> - 2014-01-25 18:33 +1100
Re: Python declarative matej@ceplovi.cz (Matěj Cepl) - 2014-01-25 12:23 +0100
Re: Python declarative Asaf Las <roegltd@gmail.com> - 2014-01-24 04:04 -0800
csiph-web