Skip to content

Instantly share code, notes, and snippets.

@tswicegood
Forked from markpasc/diamond.py
Created May 13, 2011 21:49
Show Gist options
  • Save tswicegood/971375 to your computer and use it in GitHub Desktop.
Save tswicegood/971375 to your computer and use it in GitHub Desktop.
python diamond inheritance works
class A(object):
def say(self):
print "This is A"
class B(object):
def say(self):
print "This is B"
class C(A, B):
def say(self):
print "This is C"
super(C, self).say()
C().say()
$ python ~/foo.py
This is A
This is C
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment