belinda thom wrote: > > Some context: the type of introspection I'm often wishing I could do > > in a single, easy command usually has to do w/getting to know the > > software better.
For generic introspection in Python, dir and .__doc__ are very useful. The ? trick works in ipython and prints the __doc__. > When I try the latter recommendation above w/numpy arrays, I get: ... > Type: NoneType > Base Class: <type 'NoneType'> > String Form: None > Namespace: Interactive > Docstring: > <no docstring> I agree that this one is not really informative. A >>> a.__class__.__doc__? provides a docstring interestingly truncated under ipython, but nothing useful either. However, you may want to consider the combination: >>> for k in dir(a): >>> try: >>> print "\n",k, getattr(a,k).__doc__ >>> except AttributeError: >>> pass But I'm a bit confused: what are you really trying to achieve by querying the methods of a numpy array ? The wiki page http://www.scipy.org/Numpy_Example_List_With_Doc is quite educational, and provides many examples of usage you won't find in the docstrings. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion