# resolve.py # Steve Marschner (srm2) and Lillian Leed (ljl2) """CS1110 lecture example for overriding of methods and class variables""" class A(object): x = 3 y = 5 def f(self): self.g() def g(self): print "this is A.g" class B(A): y = 4 z = 42 def g(self): print "this is B.g" def h(self): print "this is B.h" a = A() b = B() print 'a.f():' a.f() print 'b.f():' b.f() print 'b.y:', b.y print 'b.x:', b.x print 'A.y:', A.y print 'B.x:', B.x