Is there a reason why people use super(class, self).__init__() instead of super().__init__()?

I have been reading papers and looking up the corresponding code. I was looking at the code and had to brush up my OOP concepts a little bit so far in my networks I just used functions. One thing that confused me was calling super() so I looked it up. According to stack flow posts super(class, self).init() is python 2 while
super().init() is the python3 version. However I still see all the code using super(class, self).init() regardless of what version of python they are using. Is there a reason for this? Or am I just being paranoid?

5 Likes

I suppose people use it to make the code compatible with Python2.x.
Otherwise all Python2 users would have to add the class and self to the super call.
I’m not using Python3, but I think it doesn’t break the code to add (class, self).

6 Likes

You are right it doesn’t break the code. I was just paranoid over nothing. Thanks!