D
D
DUDE2020-04-27 21:35:43
Python
DUDE, 2020-04-27 21:35:43

What is the benefit of @property in python?

Hello everyone, I climbed many sites, so I really did not understand what is the PROFIT of this decorator. When should it be used?
Or is it syntactic sugar for not writing "()" to call a function?

PS The point is not that I don't know what this decorator does, I just want to know the opinion of other developers about how often they use it and whether they use it at all. And what do they think about it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2020-04-27
@sergey-gornostaev

Try to climb the textbooks.

V
Vadim Shatalov, 2020-04-27
@netpastor

https://lmgtfy.com/?q=class+property+vs+method

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question