new object of type Thought!") def message(self) -> None: print("I feel like I am diagonally parked in a parallel universe.") class Advice(Thought): def __init__(self) -> None: super(Advice, self).__init__() def message(self) -> None: print("Warning: Dates in calendar are closer than they appear") super(Advice, self).message() t = Thought() # "I'm a new object of type Thought!" t.message() # "I feel like I am diagonally parked in a parallel universe. a = Advice() # "I'm a new object of type Thought!" a.message() # "Warning: Dates in calendar are closer than they appear" # "I feel like I am diagonally parked in a parallel universe. # ------------------ # Introspection: isinstance(t, Thought) # True isinstance(a, Advice) # True isinstance(a, Thought) # True Ruby In Ruby when a subclass contains a method that overrides a method of the superclass, you can also call the superclass method by calling super in that overridden method. You can use alias if you would like to keep the overridden method available outside of the overriding method as shown with 'super_message' below. Example: class Thought def message puts "I feel like I am diagonally parked in a parallel universe." end end class Advice < Thought alias :super_message :message def message puts "Warning: Dates in calendar are closer than they appear" super end end Notes See also Implementation inheritance Inheritance semantics Method overloading Polymorphism in object-oriented programming Template method pattern Virtual inheritance X-HTTP-Method-Override HTTP Header References Deitel, H. M & Deitel, P. J.(2001). Java How to Program (4th ed.). Upper Saddle River, NJ: Prentice Hall. Lewis, J. & Loftus, W. (2008). Java: Software Solutions (6th ed.). Boston, MA: Pearson Addison Wesley. Malik, D. S.(2006). C++ Programming: Program Design Including Data Structure. (3rd ed.). Washington, DC: Course Technology. Flanagan, David.(2002).Java in a Nutshell.Retrieved from http://oreilly.com/catalog/9780596002831/preview#preview Meyer, Bertrand (2009). Touch of Class: Learning to Program Well with Objects and Contracts. Springer. External links Introduction to O.O.P. Concepts and More by Nirosh L.w.C. Overriding and Hiding Methods by Sun Microsystems Articles with example C++ code Articles with example code Articles with example Java code Method (computer programming)