|
|
|
|
|
by pansa2
1711 days ago
|
|
> Attribute lookup in Python is [...] an enormous tar pit Spot on. Python is widely described as a simple language, but the complexity of attribute lookup is one thing that shows that's not true at all. Many things in Python are easy, such as adding `@property` above a method definition to turn it into a getter. But `@property` is far from simple - the way it actually works is very complex (for example, properties have to be data descriptors, because non-data descriptors cannot override object attributes of the same name). |
|