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
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
> >
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
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_
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
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