Created
May 8, 2014 14:02
-
-
Save prutz1311/387534f1f2729db8c015 to your computer and use it in GitHub Desktop.
Access to parent's method via super
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 super(Message, self).__repr__() + ': ' + self.msg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment