Given: def foo(bar): x = 1 if bar else 2.0 return x ... kdev-python will show the type of x as float, and accordingly the return type of foo as well. Yet it should be unsure(int, float).
Git commit d3f52a0d60a39470b18caa0c2c7d8bb482fd058d by Sven Brauch. Committed on 22/01/2012 at 11:42. Pushed by brauch into branch 'master'. implement type support for ternary operators foo = 3 if False else "str" # <- foo:unsure(int,str) M +1 -0 documentation_files/builtindocumentation.py M +16 -0 duchain/expressionvisitor.cpp M +1 -0 duchain/expressionvisitor.h http://commits.kde.org/kdev-python/d3f52a0d60a39470b18caa0c2c7d8bb482fd058d
Thanks, fix confirmed :).