Created
April 1, 2013 16:30
-
-
Save jayrambhia/5286009 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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