[wingide-users] Exception Completion idea

Ken Kinder kkinder at gmail.com
Fri Jun 18 11:39:47 MDT 2010


On 06/17/2010 08:52 PM, Wingware Support wrote:
> The idea of trying to track possible exception types as well as return
> value types seems like a good one, although I don't know how well it
> would work in practice.  It might be quite costly to compute since it
> would have to trace the entire possible call graph of a code base and
> the types of everything through that graph in order to decide whether
> something like "a += b" somewhere way down the stack could raise
> TypeError.  It would also run into the limitations of looking into
> extension module code and highly dynamic code so probably could never
> be completely correct in Python.
>
> While I don't know if it's doable, I do think it's a good suggestion. 
> The same data collected for this feature might be used in other ways
> also.
>
> Thanks,
>

FWIW I think basic exceptions like KeyError or TypeError aren't really
necessary since those are completed anyway. It could be simplified if it
just looked for specific "raise" statements in the code being try'd.



More information about the wingide-users mailing list