python subclass access to class variable of parent
python subclass access to class variable of parent Question: I was surprised to to learn that a class variable of a subclass can’t access a class variable of the parent without specifically indicating the class name of the parent: >>> class A(object): … x = 0 … >>> class B(A): … y = x+1 … …