"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
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
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
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
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