[wingide-users] An idea for better auto-completion
fuzzyman at voidspace.org.uk
Tue Sep 5 10:44:38 MDT 2006
Wingware Support wrote:
> On Tue, 5 Sep 2006, Russell Warren wrote:
>> Wing also "sees" code nested in 'if 0:' blocks so you don't
>> need the code to run even in __debug__ mode.
>> My code is littered with stuff like this:
>> if 0: assert isinstance(foo, MyClass) #for Wing
> BTW, if you don't want the assert and don't need 'if 0' (usually
> only needed to avoid circular or unwanted imports to get at the
> class name) you can just say:
> isinstance(foo, MyClass)
> That's the minimum hint that Wing needs for the type.
> We're hoping to add inferencing type through function/method args
> at some point. It's a bit tricky to do well, but should greatly
> reduce the need for isinstance hints.
If you get type inferencing working, *please* consider releasing it as a
separate tool for Python programmers to do minimal checking for program
There has been a lot of research into type inferencing in Python of the
years (starkiller, Brett Cannon's thesis, Shedskin does type
inferencing, further back there was an experimental Python to Perl
translator that did some type inferencing), but none of these have
resulted in usable tools for the programmer.
Being able to catch basic type errors at compile time would be great.
> - Stephan
> Wing IDE users list
More information about the wingide-users