On Sep 13, 10:52 pm, andrea crotti wrote:
> I am in a situation where I have a class Obj which contains many
> attributes, and also contains logically another object of class
> Dependent.
> But I'm not so sure it's a good idea, it's a bit smelly..
It's actually a well regarded technique known as
- Original Message -
> 2012/9/13 Jean-Michel Pichavant :
> >
> > Nothing shocking right here imo. It looks like a classic
> > parent-child implementation.
> > However it seems the relation between Obj and Dependent are 1-to-1.
> > Since Dependent need to access all Obj attributes, are you s
Am 13.09.2012 14:51, schrieb andrea crotti:
I am in a situation where I have a class Obj which contains many
attributes, and also contains logically another object of class
Dependent.
This dependent_object, however, also needs to access many fields of the
original class, so at the moment we did
2012/9/13 Jean-Michel Pichavant :
>
> Nothing shocking right here imo. It looks like a classic parent-child
> implementation.
> However it seems the relation between Obj and Dependent are 1-to-1. Since
> Dependent need to access all Obj attributes, are you sure that Dependent and
> Obj are not a
- Original Message -
> I am in a situation where I have a class Obj which contains many
> attributes, and also contains logically another object of class
> Dependent.
>
> This dependent_object, however, also needs to access many fields of
> the
> original class, so at the moment we did som
I am in a situation where I have a class Obj which contains many
attributes, and also contains logically another object of class
Dependent.
This dependent_object, however, also needs to access many fields of the
original class, so at the moment we did something like this:
class Dependent:
de