Created
August 13, 2014 13:27
-
-
Save natemurthy/c7175809ab4b13c9bb4e 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 Animal(object): | |
def __init__(self, *args, **kwargs): | |
print "Animal args", args | |
print "Animal kwargs", kwargs | |
print "Animal name", kwargs['name'] | |
class Dog(Animal): | |
def __init(self, *args, **kwargs): | |
super(Dog, self).__init__(*args, **kwargs) | |
self.name = name | |
def print_info(self): | |
print "Dog name", self.name | |
d = Dog(name="fido") | |
d.print_info() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment