I have a very similar question to this except I would like to name my function property
so for example Id like to do something like:
class ThingWithProperties(object): def property(self, a): print("in property", a) @property def test(self): print("in test") t = Testing() t.property(1) t.test() But I get the following error:
Traceback (most recent call last): File "test.py", line 5, in <module> class ThingWithProperties(object): File "test.py", line 10, in ThingWithProperties @property TypeError: property() missing 1 required positional argument: 'a' Could someone please explain why this is happening? As well as how to work around it (without renaming my instance method)?
testbeforeproperty.