Skip to content

Instantly share code, notes, and snippets.

@mirekfranc
Created October 4, 2017 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mirekfranc/6ab294c467e2a26d085cd2fa381d3083 to your computer and use it in GitHub Desktop.
Save mirekfranc/6ab294c467e2a26d085cd2fa381d3083 to your computer and use it in GitHub Desktop.
Python overriding
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