質問

I am currently spending some time writing a wrapper for matplotlib for easier creation of plots for publications etc.

Currently I am using Spyder as IDE and I really like the Object Inspector feature which provides live documentation for the objects you are working with.

Anyways, part of my API only forwards calls to a matplotlib function and it would therefore be very handy to inherit the documentation from those.

Writing myfunction.__doc__ = matplotlibfunction.__doc__ seems to work if I print __doc__ to the console, but the Object Inspector in Spyder does not show the documentation, do anyone have a good suggestion as to why, and what I could do to get the intended behavior?

役に立ちましたか?

解決

Greg, are you trying to view myfuncion docstring from the Editor? The thing is Spyder relies on the rope library to do docstring inspection on the Editor, which unfortunately has several shortcomings we'll try to fix on the 2.2 version.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top