Andre Adrian wrote:
> Diez B. Roggisch nospam.web.de> writes:
>
>> > def ext_setattr(obj, attr, val):
>> > for subattr in attr.split("."):
>> > obj = getattr(obj, subattr)
>> > obj = val
>> >
>> import test
>> a = A()
>> > Traceback (most recent call last):
>> > File
Diez B. Roggisch nospam.web.de> writes:
> > def ext_setattr(obj, attr, val):
> > for subattr in attr.split("."):
> > obj = getattr(obj, subattr)
> > obj = val
> >
> import test
> a = A()
> > Traceback (most recent call last):
> > File "", line 1, in
> > NameError: na
Rotlaus schrieb:
On 7 Jul., 08:01, Rotlaus <[EMAIL PROTECTED]> wrote:
2 weeks ago i asked for a etended getattr() which worked really fine,
but now i would love to have a extendedsetattr() as well.
I've tried the following, but it doesn't work:
class A(object):
def __init__(self):
On 7 Jul., 08:01, Rotlaus <[EMAIL PROTECTED]> wrote:
> 2 weeks ago i asked for a etended getattr() which worked really fine,
> but now i would love to have a extendedsetattr() as well.
I've tried the following, but it doesn't work:
class A(object):
def __init__(self):
self.B = B()
cl
2 weeks ago i asked for a etended getattr() which worked really fine,
but now i would love to have a extended setattr() as well.
Lets assume i have some classes:
class A(object):
def __init__(self):
self.B = B()
class B(object):
def __init__(self):
self.C = C()
class C