I'm having trouble understanding scope of a variable in a subclass

Pyenos pyenos at pyenos.org
Wed Dec 27 23:39:04 EST 2006


class Class1:
        class Class2(Class1):
                variable="variable"
                class Class3(Class2):
                        print Class1().Class2().variable #problem

Also, why is this wrong?



More information about the Python-list mailing list