[SciPy-Dev] Supporting numpy/scipy in an IDE

Sven Brauch svenbrauch at googlemail.com
Mon Nov 25 03:01:43 EST 2013


Hi!

I'm writing a plugin for an IDE which does things like code completion on 
Python code. Usually, it gets the necessary information from static analysis 
of Python code (which works fairly well for many libraries); however, in the 
case of numpy, this obviously does not work at all because numpy is not 
written in pure Python.

For improving numpy support, I would especially need the following 
information:

 * What are the arguments of a particular function? Python's inspect won't
   tell me; it seems like this information is just available in the prosa
   text docstring. The website has it in a somewhat machine-readable way,
   is there a method to get the actual list of parameters which does not
   involve parsing that? Or is the table on the website based on parsing
   the docstring?

 * What kind of object does a function return? Of course this is not always
   well-defined, but in most cases it is. This information, too, only seems to
   be available in the prosa docstrings, if at all -- and different from the
   argument specification, it's usually just mentioned somewhere in a not
   even remotely machine-readable form.

My question is thus: Do you see any reasonable (automatable) way to extract 
this information from any resource (code, docs, ...)? I think having this 
information in a machine-readable form would also be beneficial for various 
other projects.

I'm happy about every suggestion. I dislike solutions based on inspecting 
things at runtime; it is scary to run code a user types into the editor, and 
it will also be slow in a variety of cases.

Best regards,
Sven



More information about the SciPy-Dev mailing list