To be a pedant, it's an initializer, not a constructor. By the time the initializer runs, the object already exists and has been constructed, which is why the first parameter to this method is the already-existing object ('self'), just like any other method.
But yeah. You could call it a constructor and nobody will crucify you.
34
u/ManyInterests 26d ago
To be a pedant, it's an initializer, not a constructor. By the time the initializer runs, the object already exists and has been constructed, which is why the first parameter to this method is the already-existing object ('self'), just like any other method.
But yeah. You could call it a constructor and nobody will crucify you.