On Tue, Aug 24, 2021 at 11:55:21PM -0000, Henry Harutyunyan wrote: > Currently Python does not support using `@staticmethod` decorator > along with `@property` decorator.
What is the purpose of using both staticmethod and property? Is it just to avoid type "self" in the parameter list? > I think that the it currently works is a bit misleading since it will > not give an error, but gives the following outcome. I'm not sure that staticmethod is supposed to be used with arbitrary objects such as property objects, and vice versa. I believe that they are intended to work on function objects. Nevertheless, I think that the behaviour is technically correct, if rather unexpected and probably not helpful. If you can explain why you want to chain property and staticmethod, and the required behaviour, perhaps we could make an enhancement to them. -- Steve _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/VFUPUP5OIGDL56X5BPQZ57QR6AFFQ2QK/ Code of Conduct: http://python.org/psf/codeofconduct/
