We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 155fdf2 commit 8336eb0Copy full SHA for 8336eb0
Doc/howto/descriptor.rst
@@ -1141,6 +1141,16 @@ roughly equivalent to:
1141
obj = self.__self__
1142
return func(obj, *args, **kwargs)
1143
1144
+ def __getattribute__(self, name):
1145
+ "Emulate method_getset() in Objects/classobject.c"
1146
+ if name == '__doc__':
1147
+ return self.__func__.__doc__
1148
+ return object.__getattribute__(self, name)
1149
+
1150
+ def __getattr__(self, name):
1151
+ "Emulate method_getattro() in Objects/classobject.c"
1152
+ return getattr(self.__func__, name)
1153
1154
To support automatic creation of methods, functions include the
1155
:meth:`__get__` method for binding methods during attribute access. This
1156
means that functions are non-data descriptors that return bound methods
0 commit comments