The Power of Python Descriptors
piccolo-orm.com
piccolo-orm.com
What is less nice is that the implementation of that idea in python is so tricky. Descriptors come in two flavours and behave differently depending on their type : data descriptor and non data descriptor. Doing something simple as having a descriptor writing a value in an object without clashing with other descriptors/objects is tricky. Thank god they added __set_name__ in 3.6.
I've never understood the rationale that some developers employ for using `@property` (for purely stylistic) reasons and nobody has ever managed to give a very clear explanation of their criteria. Of course the concept is handy here and there, but some people make classes where every method is a property.
I rarely use @property now. It doesn't help clarity and isn't used in codebases I'm familiar with. Maybe overuse is a symptom of under-exposure and inexperience. Or maybe it's just personal tastes.