sometimes I have need to write class with static methods, however with possibility to initialized it and keep state (object)
sth like:
class A:
@classmethod
def method(cls_or_self):
# get reference to object when A().method() or to class when A.method()
code
what I have now is:
class A:
def method(self = None, *params): code
# or
def method2(self = None, **params): code
# but what I need is rather normal parameters, not optional and named args:
def method3(self_or_cls, a, b=1, c=2, *p, **kw): code
please do not write about differences between staticmethod and classmethod. I am interested if such decorator exists (in more or less standard libs) and moreover if above is suitable for PEP.