Skip to content

Instantly share code, notes, and snippets.

@natemurthy
Created August 13, 2014 13:27
Show Gist options
  • Save natemurthy/c7175809ab4b13c9bb4e to your computer and use it in GitHub Desktop.
Save natemurthy/c7175809ab4b13c9bb4e to your computer and use it in GitHub Desktop.
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