Re: python nested class

2005-07-08 Thread George Sakkis
"Daniel Dittmar" <[EMAIL PROTECTED]> wrote: > Vedanta Barooah wrote: > > in a python nested class is it possible to change the value of the > > parent class's variable without actually creating an instance of the > > parent class > > Python nested c

Re: python nested class

2005-07-08 Thread Daniel Dittmar
Vedanta Barooah wrote: > in a python nested class is it possible to change the value of the > parent class's variable without actually creating an instance of the > parent class Python nested classs are like *static* Java nested classes. Non-static Java classes are very differen

Re: python nested class

2005-07-08 Thread bruno modulix
Roland Heiber wrote: > 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

Re: python nested class

2005-07-08 Thread Roland Heiber
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 d

python nested class

2005-07-07 Thread Vedanta Barooah
greetings in a python nested class is it possible to change the value of the parent class's variable without actually creating an instance of the parent class, consider this code: class mother: x=0 def __init__(self): self.x=1 def show