The distinction between "self" and "cls" is defined in PEP 8 . As Adrien said, this is not mandatory. It’s a coding style. PEP 8 says:
Function and method arguments:
Always use
selffor the first argument to instance methods.Always use
clsfor the first argument to class methods.