Created
May 8, 2014 14:06
-
-
Save prutz1311/5182cdf3a681b0f50984 to your computer and use it in GitHub Desktop.
Access to parent's method by direct referring to the parent
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 Message(object): | |
def __init__(self, msg): | |
self.msg = msg | |
def __repr__(self): | |
return object.__repr__(self) + ': ' + self.msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment