[IPython-user] scipy delayed importer and ?

Fernando Perez Fernando.Perez at colorado.edu
Tue Nov 2 13:49:26 CST 2004

Arnd Baecker schrieb:

> I would like to bring up an issue which we discussed some while ago.
> Last week-end I gave a workshop on Python at the Linuxtag.
> When showing how to get information on specific commands
> one person immediately stumbled across the following


> Only the second time (In [4]) you get the desired help
> So his first reaction was that there is no further documentation
> on this.
> I think it would be great if there was a solution to this...

It is indeed a problem.  I could hack something into ipython for this 
particular problem, but here's what R. Kern had to say just a moment ago on 

Arnd Baecker noted on the IPython list that modules whose imports are
postponed have no docstring until the second time they are accessed.
Normally in IPython, one can get the docstring of an object by appending
a ? to it. E.g.:

In[1] optimize?

The real docstring doesn't appear until the second time one does the ?

How about putting a docstring for _ModuleLoader that calls attention to
this fact?

"""ATTENTION: this module's import has been postponed. You will not see
the module's real documentation until the next time you access the

Repeat your action to see the real documentation.

Does anyone have a better wording?

-- Robert Kern

I'm not totally sure what the right approach would be.  I'll see if a really 
simple hack in ipython fixes it.  Otherwise I think I'd favor Robert's idea.



More information about the IPython-user mailing list