Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54655 > unrolled thread
| Started by | Fabio Zadrozny <fabiofz@gmail.com> |
|---|---|
| First post | 2013-09-23 14:37 -0300 |
| Last post | 2013-09-23 14:37 -0300 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: python IDE and function definition Fabio Zadrozny <fabiofz@gmail.com> - 2013-09-23 14:37 -0300
| From | Fabio Zadrozny <fabiofz@gmail.com> |
|---|---|
| Date | 2013-09-23 14:37 -0300 |
| Subject | Re: python IDE and function definition |
| Message-ID | <mailman.275.1379957850.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Sep 23, 2013 at 2:29 PM, Chris Friesen <cbf123@mail.usask.ca> wrote: > On 09/23/2013 09:32 AM, Fabio Zadrozny wrote: > >> On Mon, Sep 23, 2013 at 12:06 PM, Chris Friesen <cbf123@mail.usask.ca >> <mailto:cbf123@mail.usask.ca>> wrote: >> >> >> Hi all, >> >> I'm looking for a python IDE (for Linux) that can look at code like >> this: >> >> class ConductorManager(manager.__**Manager): >> >> def compute_recover(self, context, instance): >> self.compute_api.stop(context, instance, do_cast=False) >> >> where I could highlight the "stop" and ask it to go to the >> definition. (Where the definition is in a different file.) >> >> I'm running into issues where my current IDE (I'm playing with >> Komodo) can't seem to locate the definition, I suspect because it's >> too ambiguous. >> >> The fact that python is dynamically typed seems to mean that there >> could potentially be multiple answers, any class with a stop() >> method with the right signature could presumably be plausible, >> right? So rather than give up, I'd like to have my IDE suggest all >> possible answers. >> >> >> >> PyDev (http://pydev.org/) is able to do that (i.e.: if the find >> definition doesn't find it directly, it shows a list with possible >> matches for you to choose the most appropriate one: >> http://pydev.org/manual_adv_**gotodef.html<http://pydev.org/manual_adv_gotodef.html>) >> -- additionally, you can also >> search for methods/classes/attributes directly: >> http://pydev.org/manual_adv_**open_decl_quick.html<http://pydev.org/manual_adv_open_decl_quick.html> >> > > I've installed eclipse/pydev and tried it out. The problem that I'm > seeing is that it will show me *all* stop() methods that it knows about, > regardless of function signature. > > So in the above case, my function call looks like: > self.compute_api.stop(context, instance, do_cast=False) > > but pydev will offer matches that look like: > def stop(self): > > This runs into problems with commonly-named functions. I tried searching > for the start() method in: > > self.compute_api.start(**context, instance) > > and it complained that there were too many possible results. > > Basically, I'm looking for something smart enough to throw out methods > with the same name but that don't match the signature. > > Chris > > Seems like a nice request... it'd be nice if you can report it as a feature request at the pydev tracker (at https://sw-brainwy.rhcloud.com/ -- note that you have to sign up to create an issue). Cheers, Fabio
Back to top | Article view | comp.lang.python
csiph-web