Use cases for property vs. descriptor vs. __getattribute__
问题 The question refers to which one is preferable to be used in which use case, not about the technical background. In python, you can control the access of attributes via a property , a descriptor , or magic methods . Which one is most pythonic in which use case? All of them seem to have the same effect (see the examples below). I am looking for an answer like: Property : Should be used in case of … Descriptor : In the case of … it should be used instead of a property. Magic method : Only use