Skip to content

Instantly share code, notes, and snippets.

@depp
Created November 7, 2014 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save depp/87a5f1079556eb0ed07e to your computer and use it in GitHub Desktop.
Save depp/87a5f1079556eb0ed07e to your computer and use it in GitHub Desktop.
Why you shouldn't call super(self.__class__, self).__init__()
class A(object):
def __init__(self):
print('A')
class B(A):
def __init__(self):
print('B')
super(self.__class__, self).__init__()
class C(B):
def __init__(self):
print('C')
super(self.__class__, self).__init__()
C()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment