V
vida00
Hi,
I scouted the ng for someone w/ a similar problem and couldn't find
one, so I might be thinking about this probable non-issue in a wrong
way.
What I am trying to accomplish should be pretty self explanatory when
looking at the following:
.... def __init__(self):
.... self.foo='hello'
.... def change(self):
.... self.foo+=' world'
.... def show(self):
.... return self.foo
....
.... class hih(object):
.... def __init(self):
.... self.foo=heh.foo()
.... def show(self):
.... return self.foo
....Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 13, in show
AttributeError: 'hih' object has no attribute 'foo'
so, how do I reference heh.foo in its current state (i.e. 'hello
world', not 'hello') from hih?
Thanks,
-Josh.
I scouted the ng for someone w/ a similar problem and couldn't find
one, so I might be thinking about this probable non-issue in a wrong
way.
What I am trying to accomplish should be pretty self explanatory when
looking at the following:
.... def __init__(self):
.... self.foo='hello'
.... def change(self):
.... self.foo+=' world'
.... def show(self):
.... return self.foo
....
.... class hih(object):
.... def __init(self):
.... self.foo=heh.foo()
.... def show(self):
.... return self.foo
....Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<stdin>", line 13, in show
AttributeError: 'hih' object has no attribute 'foo'
so, how do I reference heh.foo in its current state (i.e. 'hello
world', not 'hello') from hih?
Thanks,
-Josh.