Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(at': 0.04; 'skip:\xa0 30': 0.05; 'dynamically': 0.07; 'matches': 0.07; 'definition,': 0.09; 'ide': 0.09; 'typed': 0.09; 'runs': 0.10; 'cc:addr:python- list': 0.11; 'python': 0.11; 'def': 0.12; 'suggest': 0.14; "(i'm": 0.16; '23,': 0.16; 'cc:name:python list': 0.16; 'complained': 0.16; 'definition.': 0.16; 'fabio': 0.16; 'highlight': 0.16; 'throw': 0.16; 'url:pydev': 0.16; '\xa0def': 0.16; 'subject:python': 0.16; 'appropriate': 0.16; 'url:)': 0.16; 'wrote:': 0.18; 'all,': 0.19; '(where': 0.19; 'seems': 0.21; 'cc:addr:python.org': 0.22; 'instance,': 0.24; '\xa0so': 0.24; 'mon,': 0.24; 'regardless': 0.24; 'cheers,': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'this:': 0.26; 'tracker': 0.26; '(for': 0.26; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'tried': 0.27; 'function': 0.29; 'chris': 0.29; 'feature': 0.29; 'am,': 0.29; "doesn't": 0.30; '8bit%:3': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'context,': 0.31; 'directly,': 0.31; 'sep': 0.31; 'class': 0.32; 'skip:c 30': 0.32; 'running': 0.33; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; "can't": 0.35; 'knows': 0.35; 'skip:s 30': 0.35; 'something': 0.35; 'case,': 0.35; 'definition': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'functions.': 0.36; 'in:': 0.36; 'right?': 0.36; 'method': 0.36; 'shows': 0.36; 'possible': 0.36; 'url:org': 0.36; 'searching': 0.37; 'too': 0.37; 'list': 0.37; 'skip:o 20': 0.38; 'skip:& 10': 0.38; 'problems': 0.38; 'fact': 0.38; 'pm,': 0.38; 'rather': 0.38; 'enough': 0.39; 'results.': 0.60; 'up,': 0.60; 'most': 0.60; 'offer': 0.62; 'show': 0.63; 'name': 0.63; 'choose': 0.64; 'different': 0.65; 'potentially': 0.81; '"stop"': 0.84; "it'd": 0.84; 'presumably': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=FGi3ByjyAubxrYrHeoMK6Is84v1QnV75ZIb6fau644s=; b=nZfwdw3hzECTToPlpae9sM3g5g6GdEhFAMI4tL+H18QBSS00hkPSuLqym43/KdOfqC XdEull+3nIJ4uAPtfdag7zTEUKN78AIVnF4Iesz845sEE+q9ITi5smrnBW9XJzQL2GYW icjGsX5MJ613nerJGLCFj0NCjsuhK8QosIDr4s3b4YJ9B4Zf/gLyMWfFSj7CeQEHDsFU JsrRHGlA8QKXVKjuljUzv40JBo85wSjyD9A4YOpTBJMHdFRFM71XezBW5ae5BCS1nOy7 ZPGHxg2LhJvedxMTDFmvs82RSb9l4INBypvb7A91zsFfvbAMouyCGURQhPH/nUOGXUUV 7zKQ== X-Received: by 10.58.44.37 with SMTP id b5mr23361753vem.4.1379957841179; Mon, 23 Sep 2013 10:37:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <52407A5C.90401@mail.usask.ca> References: <524058FB.20005@mail.usask.ca> <52407A5C.90401@mail.usask.ca> From: Fabio Zadrozny Date: Mon, 23 Sep 2013 14:37:01 -0300 Subject: Re: python IDE and function definition To: Chris Friesen Content-Type: multipart/alternative; boundary=089e013a132aedb98d04e71078ce Cc: python list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 179 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379957850 news.xs4all.nl 15915 [2001:888:2000:d::a6]:60716 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54655 --089e013a132aedb98d04e71078ce Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 23, 2013 at 2:29 PM, Chris Friesen wrote: > On 09/23/2013 09:32 AM, Fabio Zadrozny wrote: > >> On Mon, Sep 23, 2013 at 12:06 PM, Chris Friesen > > 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) >> -- additionally, you can also >> search for methods/classes/attributes directly: >> 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 --089e013a132aedb98d04e71078ce Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Sep 23, 2013 at 2:29 PM, Chris Friesen <cbf1= 23@mail.usask.ca> wrote:
On 09/23/2013 09:32 AM, Fabio Zadrozny w= rote:
On Mon, Sep 23, 2013 at 12:06 PM, Chris Friesen <cbf123@mail.usask.ca
<mailto:cbf123= @mail.usask.ca>> wrote:


=A0 =A0 Hi all,

=A0 =A0 I'm looking for a python IDE (for Linux) that can look at code = like
=A0 =A0 this:

=A0 =A0 class ConductorManager(manager.__Manager):
=
=A0 =A0 =A0 =A0 =A0def compute_recover(self, context, instance):
=A0 =A0 =A0 =A0 =A0 =A0 =A0self.compute_api.stop(context, instance, do_cast= =3DFalse)

=A0 =A0 where I could highlight the "stop" and ask it to go to th= e
=A0 =A0 definition. (Where the definition is in a different file.)

=A0 =A0 I'm running into issues where my current IDE (I'm playing w= ith
=A0 =A0 Komodo) can't seem to locate the definition, I suspect because = it's
=A0 =A0 too ambiguous.

=A0 =A0 The fact that python is dynamically typed seems to mean that there<= br> =A0 =A0 could potentially be multiple answers, any class with a stop()
=A0 =A0 method with the right signature could presumably be plausible,
=A0 =A0 right? =A0So rather than give up, I'd like to have my IDE sugge= st all
=A0 =A0 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) -- additionally, you can a= lso
search for methods/classes/attributes directly:
http://pydev.org/manual_adv_open_decl_quick.html

I've installed eclipse/pydev and tried it out. =A0The problem that I= 9;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=3DFalse)

but pydev will offer matches that look like:
def stop(self):

This runs into problems with commonly-named functions. =A0I 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=A0https://sw-brainwy.rhcloud.com/=A0-- note that you have to sign up = to create an issue).

Cheers,

Fabio

--089e013a132aedb98d04e71078ce--