Vedanta Barooah wrote: > o = mother() > o.show() > y=mother.child() > y.increase(20) > # this should print 20 > o.show() > > ...... is it possible somehow ???
Hi, this should do what you want: --- test.py class mother: x=0 def __init__(self): mother.x=1 def show(self): print mother.x class child: def increase(self,num): mother.x=num o = mother() o.show() y=mother.child() y.increase(20) # this should print 20 o.show() --- >pythonw -u "test.py" 1 20 >Exit code: 0 HtH, Roland -- http://mail.python.org/mailman/listinfo/python-list