Skip to content

Instantly share code, notes, and snippets.

@gabrielcesar
Created January 17, 2017 14:57
Show Gist options
  • Save gabrielcesar/dc7c6b8a9d5211264fd99d241ff3f9dc to your computer and use it in GitHub Desktop.
Save gabrielcesar/dc7c6b8a9d5211264fd99d241ff3f9dc to your computer and use it in GitHub Desktop.
#polymorphism-0002.py
class Base:
def show ( self ):
print ( 'Classe Base' )
class Derivada ( Base ):
def show ( self ):
print ( 'Classe Derivada' )
base = Base ()
derivada = Derivada ()
base.show ()
derivada.show ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment