[IPython-User] Feature suggestions to ipython notebook
Wed Sep 11 12:46:30 CDT 2013
On Wed, Sep 11, 2013 at 10:31 AM, Thomas Kluyver <firstname.lastname@example.org> wrote:
> On 11 September 2013 10:02, Aaron Meurer <email@example.com> wrote:
>> > 5. Jump to the definition of a function (within the same notebook); a
>> > function can be defined many times though.
>> This is a hard problem in general, due to the dynamic nature of
>> python. But libraries like Jedi do a pretty good job.
> Actually, I think it might be fairly easy to jump to the *cell* where a
> function was defined, which is probably good enough for most cases. Each
> cell is executed with a different 'filename' containing its number within
> the session, and code objects created in that cell record that filename:
This is already how `%edit` works when you pass it an interactively defined
> So you could just parse out the prompt number, and find the corresponding
> cell. Of course, that's not foolproof, e.g. if the cell is merged or split
> after running it.
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User