-
-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Description
Hello
I have a code:
class A:
string = 'Hello'
@property
def __doc__(self):
return self.string
class MyCustomProxy(wrapt.ObjectProxy):
pass
if __name__ == '__main__':
a = A()
dmw = wrapt.ObjectProxy(a)
dmwc = MyCustomProxy(a)
print(dmw.__doc__)
print(dmwc.__doc__)
a.string = 'Yes'
print(dmw.__doc__)
print(dmwc.__doc__)Result:
Hello
Hello
Yes
Hello
Python implementation of the proxy object calls doc from its ProxyObject.@Propert(doc).
However, C implementation hard-copies doc value to the proxy if inheriting from it.
Is this expected?
Metadata
Metadata
Assignees
Labels
No labels