
On Tue, Apr 05, 2022 at 09:55:00PM +1200, Greg Ewing wrote:
I would also say that if you're passing super anything *other* than the class where the method is defined, you're trying to be too clever by half, and will get bitten.
+1 In Python 3, you should (nearly?) always just call the zero-argument form of super from inside methods. I think that the only time you need to specify the arguments yourself is when you are writing a method outside of the class, and injecting into an existing class: ``` class Spam(Food): pass # outside the class, later on. def method(self, arg): a = super().method(arg) # won't work a = super(Spam, self).method(arg) # but this will return a Spam.method = method ``` I can't think of any other good reasons for manually providing the arguments to super, but that doesn't mean they don't exist. -- Steve