InheritanceSpecificationclass A: varA = 42 def method1(self): print "Class A: method1" class B(A): # Inherits from class A varB = 37 def method2(self): print "Class B: method2" Use
|
<<< | O'Reilly OSCON 2000, Introduction to Python, Slide 96 July 17, 2000, beazley@cs.uchicago.edu |
>>> |