Created
January 17, 2017 14:57
-
-
Save gabrielcesar/dc7c6b8a9d5211264fd99d241ff3f9dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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