Re: Confused about class relationships

2008-12-02 Thread Craig Allen
what you have is a totally acceptable factory system. Not sure why you are using a generator, but that's another matter. I agree with the previous replies regarding inheritance... this is not a case for inheritance. You could, however, have Bar be a borg with the Bar factory built in as a class

Re: Confused about class relationships

2008-11-30 Thread John O'Hagan
On Sat, 29 Nov 2008, Carl Banks wrote: > On Nov 26, 11:20 pm, John O'Hagan <[EMAIL PROTECTED]> wrote: [...] > > > > class Bar(list): > > > >         def __init__(self, a_bar, args, engine): > >                 list.__init__ (self, a_bar) > >                 self[:] = a_bar         > >              

Re: Confused about class relationships

2008-11-29 Thread Carl Banks
On Nov 26, 11:20 pm, John O'Hagan <[EMAIL PROTECTED]> wrote: > Apologies if this is a D.Q., I'm still learning to use classes, and this > little problem has proved too specific to find in the tutorials. > > I have two classes with a relationship that I find confusing. > > One is called Engine, and

Re: Confused about class relationships

2008-11-28 Thread Tim Roberts
John O'Hagan <[EMAIL PROTECTED]> wrote: > >Apologies if this is a D.Q., I'm still learning to use classes, and this >little problem has proved too specific to find in the tutorials. > >I have two classes with a relationship that I find confusing. > >One is called Engine, and it has a method (bar_

Re: Confused about class relationships

2008-11-27 Thread bieffe62
On 27 Nov, 06:20, John O'Hagan <[EMAIL PROTECTED]> wrote: > Apologies if this is a D.Q., I'm still learning to use classes, and this > little problem has proved too specific to find in the tutorials. > > I have two classes with a relationship that I find confusing. > > One is called Engine, and it

Confused about class relationships

2008-11-26 Thread John O'Hagan
Apologies if this is a D.Q., I'm still learning to use classes, and this little problem has proved too specific to find in the tutorials. I have two classes with a relationship that I find confusing. One is called Engine, and it has a method (bar_builder) which generates instances of the other