Python's descriptor protocol is very elegant. Given:<p><pre><code> class C:
def __init__(self):
self.a = 1
def b(self):
print(f'b({self})')
@property
def c(self):
print(f'c({self})')
o = C()
</code></pre>
The descriptor protocol is a generic way to enable `o.a` to access an attribute of `o`, `o.b` to access an attribute of `C` and bind `self` to `o`, and `o.c` to access an attribute of `C`, bind `self` to `o`, <i>and call it</i>.<p>Do any other dynamic languages use a similar protocol for attribute access?<p>Ruby, for example, doesn't need to - it can use a simpler approach because `o.x` never refers to an attribute of `o`.<p>JavaScript's solution is less elegant - the way it sets the value of `this` is infamous, and AFAIK properties are treated as a special case rather than built on top of a generic protocol.