Created
October 4, 2017 12:21
-
-
Save mirekfranc/6ab294c467e2a26d085cd2fa381d3083 to your computer and use it in GitHub Desktop.
Python overriding
This file contains 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
class Foo(object): | |
def fce(self): | |
print "foo" | |
class Bar(Foo): | |
def fce(self): | |
super(Bar, self).fce() # c'est nécessaire | |
print "bar" | |
a = Bar() | |
a.fce() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment