Created
July 11, 2013 14:30
-
-
Save mittenchops/5975966 to your computer and use it in GitHub Desktop.
Subclassing in python
This file contains hidden or 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 Superclass(object): | |
| def __init__(self): | |
| print 'Do something' | |
| class Subclass(Superclass): | |
| def __init__(self): | |
| super(Subclass, self).__init__() | |
| print 'Do something else' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment