3 ms·
What's even worse IMO is the lack of a proper built-in 'super'. The self parameters at least serve the purpose of deciding whether a function is a class functio
by DeepDuh 14y ago
What's even worse IMO is the lack of a proper built-in 'super'. The self parameters at least serve the purpose of deciding whether a function is a class function or object function.
So yeah, I agree, python's OOP is kind of awkward. I love the ease of composition though, something I use extensively even in other languages since I know python.
- masklinn 14y ago> The self parameters at least serve the purpose of deciding whether a function is a class function or object function. No, it does not.
- eru 14y agoIt doesn't do that for the interpreter / compiler. But it's a common enough idiom that the human reader can rely on it.
- aptwebapps 14y agoTo elaborate on masklinn's answer, you need to add the @classmethod decorator to get a class method instead of an instance method.