Skip to content

Instantly share code, notes, and snippets.

@jayrambhia
Created April 1, 2013 16:30
Show Gist options
  • Save jayrambhia/5286009 to your computer and use it in GitHub Desktop.
Save jayrambhia/5286009 to your computer and use it in GitHub Desktop.
class foo:
def __init__(self):
self.a = "abc"
def defB(self):
self.b = "B"
def printB(self):
print self.b
class bar:
def __init__(self):
self.a = "abc"
def defB(self):
self.b = "B"
@defB
def printB(self):
print self.b
f = foo()
f.printB()
f1 = bar()
f1.printB()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment