I am a python django newbie, and was going through some open source code, What does the following source code mean:
this was inside models.py of a django application.
class Sale(models.Model):
def __init__(self, *args, **kwargs):
super(Sale, self).__init__(*args, **kwargs)
Please keep your language simple. I am a non computer science background and new to OOP.
Salewhich is a subclass ofmodels.ModelSalewhich takes any number of positional arguments (*args) and any keyword arguments (**kwargs)super(Sale, self).__init__) passing along all of the positional and keyword arguments it received.Basically it “passes through” arguments to its initializer to the parent class’s initializer .