[SciPy-dev] Postponed imports and docstrings

Robert Kern rkern at ucsd.edu
Tue Nov 2 13:38:31 CST 2004


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 ? 
magic.

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
module.

Repeat your action to see the real documentation.
"""

Does anyone have a better wording?

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter




More information about the Scipy-dev mailing list