I like that IPython will fetch docstrings if I type foo.bar?
However, I may sometimes build the foo.bar
method dynamically, using foo.__getattr__
. I could conceivably also generate a docstring dynamically, perhaps in a magic method like foo.__getdoc__
.
Does IPython provide any mechanism for doing this, such that it would discover and display docstrings built on the fly?