Best Python IDE Code Completion!

Stephan Deibel sdeibel at wingide.com
Thu Jan 15 11:02:16 EST 2004


On Thu, 15 Jan 2004, Mirko Zeibig wrote:
> Python is dynamically typed, so no editor in the world can guess the 
> type of any function parameters correctly. If you know about the true 
> nature of one, you may assist Wing IDE by using isinstance.
> 
> class Klass(object):
> 
>      def hello(self):
>         print "Hello"
> 
> def foo(bar):
>      assert isinstance(bar, Klass)
>      bar.hello()
> 
> Without the assert line, it's impossible to detect which type bar has. 
> Only during runtime the type of bar is known.

Note that you can also use the following form to cover cases where you run
into circular imports:

if 0:
  import mymod
  isinstance(bar, mymod.Klass)

The source analyser still picks up on the hint but nothing is done at
runtime.

> John said the following on 01/15/2004 12:52 PM:
> >   Wing IDE seems converse. The editor auto list members is great but
> > has no calltips. The interactive window has no completion at all.
> I second this, though the editor sometimes need a bit of help ...
> and I do not like the MDI approach they have.

We're changing that and adding calltips too... If you want announcement
of upcoming releases sign up here:

http://wingide.com/announcelist

Sorry, I can't currently reveal anything about expected release dates.

> >   Python has great introspective capabilities and we have a great open
> > contributing community. What technical difficulties keep us from
> > having REAL code completion like MS, Borland and several Java IDEs
> > (All of which have been funded at one time or the other if not
> > entirely - perhaps this is the reason?)

Wing does static analysis of code (which can't use Python's introspection)  
because it can't rely on all code being executed (all classes
instantiated, etc).  Also, during editing code often is incorrect and
won't run but we still want to update analysis information.  It's not a
trivial problem, esp. considering the need for speed, but it basically is
doable for most Python code.  Something like runtime introspection is a
lot easier when appropriate, and ahem yes, we really should add that to
our shell and debug probe tools!

Stephan Deibel

--
Wing IDE for Python
Archaeopteryx Software, Inc
Take Flight!

www.wingide.com




More information about the Python-list mailing list