inkplay_
inkplay_

Reputation: 307

Pytorch super(class, self).__init__() vs super().__init__()

So far out of all the paper and its corresponding code I see people use super(class, self).__init__() instead of super().__init__() within their def __init__ function regardless of which python version people are using. Why? I thought they are the same thing but different syntax for different version of python. Am I paranoid or is there an actual reason to use the old format in pytorch?

Edited: It's for backward compatibility and nothing else.

Upvotes: 4

Views: 2654

Answers (1)

inkplay_
inkplay_

Reputation: 307

I asked on the official form and it seems to be just for backward compatibility and nothing else.

Upvotes: 3

Related Questions