Skip to content

Instantly share code, notes, and snippets.

@m7salam
Created October 14, 2019 02:58
Show Gist options
  • Select an option

  • Save m7salam/aae46b48a5f695c42cf51dc66d3f74e8 to your computer and use it in GitHub Desktop.

Select an option

Save m7salam/aae46b48a5f695c42cf51dc66d3f74e8 to your computer and use it in GitHub Desktop.
test python salesminded
class A(object):
def go(self):
print("go A go!")
def stop(self):
print("stop A stop!")
def pause(self):
raise Exception("Not Implemented")
class B(A):
def go(self):
super(B, self).go()
print("go B go!")
class C(A):
def go(self):
super(C, self).go()
print("go C go!")
def stop(self):
super(C, self).stop()
print("stop C stop!")
class D(B,C):
def go(self):
super(D, self).go()
print("go D go!")
def stop(self):
super(D, self).stop()
print("stop D stop!")
def pause(self):
print("wait D wait!")
class E(B,C): pass
a = A()
b = B()
c = C()
d = D()
e = E()
# specify output from here onwards
a.go()
b.go()
c.go()
d.go()
e.go()
a.stop()
b.stop()
c.stop()
d.stop()
e.stop()
a.pause()
b.pause()
c.pause()
d.pause()
e.pause()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment