0

In Python, we can use @property decorator to use the method as property.

>>> Class A:
>>>    @property
>>>    def b(self):
>>>        return 1
>>> a = A()
>>> a.b
1

Is there any way to do this in Lua? Are there any examples of that?

Mirat Can Bayrak
  • 631
  • 7
  • 18

0 Answers0