adding a docstring to an instancemethod

jelle jelleferinga at
Wed Jul 25 13:05:37 CEST 2007


I'm working on documenting wrapped C++ methods.
The thing is that I'd like to add docstrings to a method, but python
won't allow me to:
TypeError: attribute '__doc__' of 'instancemethod' objects is not

What would be an easy way to do so? I'd like to overload the .__doc__,
rather than wrapping it in a class.



More information about the Python-list mailing list