<div dir="auto">Hi,<div dir="auto">I'm working on decorators that have a dynamic __doc__ property computed at runtime and not at decoration time.</div><div dir="auto"><br></div><div dir="auto">The decorator must return the wrapper as a function and can not return a callable object with __call__ since the "self" argument would not be properly passed through the decorator. (Making __call__ a static method drops implicitly the first argument). If __call__ could be a static method and get the arguments as-are, I could make __doc__ a property. But this is not possible,  right?</div><div dir="auto"><br></div><div dir="auto">Assigning a class satisfying the property protocol to the function wrapper.__doc__ did not work either since the property object is returned as-is instead of invoking __get__ on it.</div><div dir="auto"><br></div><div dir="auto">Could someone explain a bit -- is this the desired behavior or a bug or an underspecification?</div><div dir="auto"><br></div><div dir="auto">Is there any way for a callable object to be used as a decorator?</div><div dir="auto"><br></div><div dir="auto">Thanks!</div><div dir="auto"><br></div><div dir="auto">Cheers Marko </div></div>