On Fri, 2009-01-09 at 10:46 -0800, Dennis Lee Bieber wrote:
> On Wed, 07 Jan 2009 11:38:29 -0500, "J. Cliff Dyer"
> declaimed the following in comp.lang.python:
>
> > I want to be able to create an object of a certain subclass, depending
> > on the argument given to the class constructor.
> >
>
Thanks for the solutions everyone! I'm not sure which I'll end up
using, but I think I've got a better grasp of the problem now.
Cool stuff.
Cheers,
Cliff
On Thu, 2009-01-08 at 06:52 -0800, Paul McGuire wrote:
> On Jan 7, 12:00 pm, Paul McGuire wrote:
> > On Jan 7, 10:38 am, "J. Cliff Dyer"
On Jan 7, 12:00 pm, Paul McGuire wrote:
> On Jan 7, 10:38 am, "J. Cliff Dyer" wrote:
>
> > I want to be able to create an object of a certain subclass, depending
> > on the argument given to the class constructor.
>
> > I have three fields, and one might need to be a StringField, one an
> > Integ
J. Cliff Dyer wrote:
> I want to be able to create an object of a certain subclass, depending
> on the argument given to the class constructor.
>
> I have three fields, and one might need to be a StringField, one an
> IntegerField, and the last a ListField. But I'd like my class to
> delega
J. Cliff Dyer a écrit :
I want to be able to create an object of a certain subclass, depending
on the argument given to the class constructor.
I have three fields, and one might need to be a StringField, one an
IntegerField, and the last a ListField. But I'd like my class to
delegate to the pro
J. Cliff Dyer wrote:
I want to be able to create an object of a certain subclass, depending
on the argument given to the class constructor.
I have three fields, and one might need to be a StringField, one an
IntegerField, and the last a ListField. But I'd like my class to
delegate to the proper
On Jan 7, 10:38 am, "J. Cliff Dyer" wrote:
> I want to be able to create an object of a certain subclass, depending
> on the argument given to the class constructor.
>
> I have three fields, and one might need to be a StringField, one an
> IntegerField, and the last a ListField. But I'd like my c
I want to be able to create an object of a certain subclass, depending
on the argument given to the class constructor.
I have three fields, and one might need to be a StringField, one an
IntegerField, and the last a ListField. But I'd like my class to
delegate to the proper subclass automatically