Skip to content

Instantly share code, notes, and snippets.

@dirn
Created May 7, 2014 18:49
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 dirn/9251e1c9cb7643469ae6 to your computer and use it in GitHub Desktop.
Save dirn/9251e1c9cb7643469ae6 to your computer and use it in GitHub Desktop.
class Base(object):
def name(self):
return 'Base'
class Subclass(Base):
def name(self):
return 'Subclass'
def parent_name(self):
return super(Subclass, self).name()
base = Base()
subclass = Subclass()
print base.name()
print subclass.name()
print subclass.parent_name()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment