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

Sven Brauch svenbrauch at googlemail.com
Mon Nov 25 11:47:29 EST 2013


Hi!

> You can either pitch in on IPython-dev or directly on github.
Thanks, I'll look around. I'll have to investigate how dynamic the
nature of the IPython completion is, since what I do relies purely on
static analysis and pre-computed information.

> People from Spyder also use IPython under the hood for completion IIRC,
> LightTable can also hook
> into IPython I guess.
I still see quite a problem here: IPython can use runtime inspection.
Thus, you don't really need to care what a function returns; you can
just wait until it was executed, and then inspect the object to
provide completion. I cannot do that, I need to compute this
information before the code is actually executed.

> I think one way this can be improved is using Python3 annotation to hint the
> type of the parameters
> and or return value.
Yes, if people use this feature for providing type hints, that will
definitely be very helpful.
It doesn't really help the numpy case though, or does it? Most of its
functions are C functions which cannot be annotated.

> Of course one solution could also be to uniformise  numpy  docstrings.
That would of course be the best solution: put return types into the
docstrings in a somewhat machine-readable format. In my opinion that
would also improve the usefulness of the generated documentation for
humans, at least in some cases (since it will be easier to spot what a
particular function returns).

It would be awesome if that could be something like an official
recommendation for writing numpy docstrings; any chance of doing
something like that?
I would be happy to help fix up the existing docstrings, I think if a
few people would participate it would be quite doable.

Greetings!
Sven



More information about the SciPy-Dev mailing list