Re: object oriented programming question

2005-12-19 Thread Daniel Nogradi
Hi Michael, one more thing. As you could see my only goal was to be able to say 1  inst = x() 2 3  inst.a("some string") 4  inst.a.func() 5 6  inst.b("some other string") 7  inst.b.func() and (3) should modify 'inst.content' in some way depending on "some string" and the attribute 'a' while (4)

Re: object oriented programming question

2005-12-18 Thread Daniel Nogradi
Hello Daniel You've certainly got a lot going on here.The heart of your question seems to be how a nested (inner) class _a can access its parent, x.  The short answer is that, in Python, it can't without some help.  _a and its instances are unaware of the context in which they are defined, sothey h

Re: object oriented programming question

2005-12-17 Thread Michael Spencer
Daniel Nogradi wrote: > I have class 'x' with member 'content' and another member 'a' which is an > instance of class '_a'. The class '_a' is callable and has a method 'func' > which I would like to use to modify 'content' but I don't know how to > address 'content' from the class '_a'. Is it pos