0
Is self required as an argument to all method definitions or just for init?
2 Respostas
0
All class-methods seem to require 'self' or 'cls' for decorators replacing self. Unless you replace either term with arbitrary terms. 😉
Static-methods don't seem to require either.
Class-methods call the instance.
Static-methods call the class.
0
For all of them. Basically each method is part of the class, but it can only be called by an instance of the class. Dogs have four legs, but only an actual instance of the category "Dog" can actually have legs.