Skip to content

Instantly share code, notes, and snippets.

@meoooh
Created November 26, 2013 07:19
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 meoooh/7654544 to your computer and use it in GitHub Desktop.
Save meoooh/7654544 to your computer and use it in GitHub Desktop.
class RightDoor(object):
def right_open(self):
print "RightDoor open complete"
self.beep()
class LeftDoor(object):
def left_open(self):
print "LeftDoor open complete"
self.beep()
class Car(LeftDoor, RightDoor):
def door_open(self):
self.right_open()
self.left_open()
def beep(self):
print 'Beep!'
c = Car()
c.door_open()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment