DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Calling Super In Python

04.21.2010
| 1819 views |
  • submit to reddit
        
def __init__(self, first_arg, second_arg, third_arg):
    super(ThisClassName, self).__init__(first_arg, second_arg, third_arg)

Note that <i>self</i> is not included as the first arg in <i>__init__</i>.

Reference: <a href="http://stackoverflow.com/questions/576169/python-super/576183#576183">StackOverflow Thread</a>