[Python-ideas] Re: staticmethod vs classmethod [was: Add a decorators called @staticproperty]

2022-01-05 Thread Neil Girdhar
Totally agree with this. I think both of points should be clarified in the documentation: https://docs.python.org/3/library/functions.html#staticmethod Namely that: * Nearly all uses of static methods should instead be class methods, and * The main exception is setting an ordinary function as a

[Python-ideas] Re: staticmethod vs classmethod [was: Add a decorators called @staticproperty]

2021-12-19 Thread Serhiy Storchaka
19.12.21 19:41, Ethan Furman пише: > On 12/19/21 5:40 AM, Serhiy Storchaka wrote: > >> classmethod supersedes staticmethod. It was not clearly known when they >> were introduced, but now we see that there is very few use cases for >> staticmethod which cannot be replaced by classmethod (actually o