A few corrections...
> 2. I'm not sure weather multiple inheritance will be a feasible
> solution in Python (because the code that is going to introspect the
> Thing super class and add its fields to our class is model.Model, which
> is one of the suer classes).
It is actually feasible, I just c
Malcolm Tredinnick wrote:
> ---
> 1. Abstract Base class
> ---
> One use-case for subclassing is to use the base class as a place to
> store common fields and functionality. It is purely a "factor out the
> common stuff" holder and you don't ever intend to u
Jacob Kaplan-Moss wrote:
> On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote:
> > Rather than watch the "inherit from User" thread go round and round,
> > maybe I should give people something more concrete to think about.
First of all, +1 on this proposal. I've been approaching this problem
f
Bill de hÓra wrote:
> Malcolm Tredinnick wrote:
>
>> table design with
>> lots of sparse columns won't get me invited to the cool parties.
>
> Qotd!
>
(added to my quotes-collection :-)
gabor
--~--~-~--~~~---~--~~
You received this message because you are sub
Malcolm Tredinnick wrote:
> table design with
> lots of sparse columns won't get me invited to the cool parties.
Qotd!
[I should say what you're doing sounds great; just trying to figure out
where the constraints and gotchas are at.]
cheers
Bill
--~--~-~--~~~---~
Malcolm Tredinnick wrote:
> On Sun, 2006-07-23 at 17:12 +0100, Bill de hÓra wrote:
> > Malcolm Tredinnick wrote:
> > > ---
> > > 3. What you don't get
> > > ---
> > > [...]
> > > I am not implementing the "everything in one table" storage model. It is
> >
Malcolm Tredinnick wrote:
> Rather than watch the "inherit from User" thread go round and round,
> maybe I should give people something more concrete to think about.
>
> This is a follow-up to the mail I sent late on Friday. It describes the
> area where we need API additions or some kind of semi
On 7/24/06, Bryan <[EMAIL PROTECTED]> wrote:
Russell Keith-Magee wrote:> 2) A decorator:When did python support class decorators?You know... one of these days, I'm going to learn to have coffee before I touch a keyboard :-)
You are correct - the @ syntax doesn't work for classes. However, that does
+1
This is great, Malcom, and a step forward to my comments/goals/rants in
the other thread.
Russell Keith-Magee wrote:
> 2) A decorator:
>
> @models.Abstract
> class Thing(models.Model):
>...
>
When did python support class decorators?
Jacob Kaplan-Moss wrote:
> ... I like seeing that a m
First off: +1 and then some from me - this is some great stuff, Malcolm. On 7/24/06, Malcolm Tredinnick <
[EMAIL PROTECTED]> wrote:On Sun, 2006-07-23 at 11:31 -0500, Jacob Kaplan-Moss wrote:
> On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote:[...]>> > (1) What notation to use to declare a clas
On Sun, 2006-07-23 at 11:31 -0500, Jacob Kaplan-Moss wrote:
> On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote:
[...]
>
> > (1) What notation to use to declare a class as abstract? I've
> > thrown out
> > Meta.is_abstract -- any preference for alternatives?
>
> Bill de hÓra suggests ``mod
On Sun, 2006-07-23 at 17:12 +0100, Bill de hÓra wrote:
> Malcolm Tredinnick wrote:
>
> > ---
> > 1. Abstract Base class
> > ---
> > [...]
> >For example,
> >
> > class Thing(models.Model):
> >name = models.CharField(...)
> >
>
On Jul 22, 2006, at 9:37 PM, Malcolm Tredinnick wrote:
> Rather than watch the "inherit from User" thread go round and round,
> maybe I should give people something more concrete to think about.
W00t -- I'm about +1,000 on your proposal; it's well-thought-out,
clean, and seems to hit all the ri
Malcolm Tredinnick wrote:
> ---
> 1. Abstract Base class
> ---
> [...]
>For example,
>
> class Thing(models.Model):
>name = models.CharField(...)
>
> class Animal(Thing):
>genus = models.CharField(...)
>
On Sun, 2006-07-23 at 13:02 +0400, Ivan Sagalaev wrote:
> First of all: Malcolm, this looks damn cool and very well thought out!
> Thank you!
Thanks.
>
> Malcolm Tredinnick wrote:
> > ---
> > 2. "Pythonic" Inheritance
> >
> > ...
> >
> > (i
First of all: Malcolm, this looks damn cool and very well thought out!
Thank you!
Malcolm Tredinnick wrote:
> ---
> 2. "Pythonic" Inheritance
>
> ...
>
> (in the above classes, Animal
> would have a foreign key reference to the Thing table, s
Rather than watch the "inherit from User" thread go round and round,
maybe I should give people something more concrete to think about.
This is a follow-up to the mail I sent late on Friday. It describes the
area where we need API additions or some kind of semi-major change to
incorporate model i
17 matches
Mail list logo