Creating type evaluation annotation
tjol at tjol.eu
Thu Dec 6 13:01:22 EST 2018
On 06/12/2018 11:48, Marek Mosiewicz wrote:
> I'm Java developer,but had some experience with Python based
> ERP software. It is quite serious application and I feel
> unconfortable with not having type checking. I do not say language
> should be static, but having checking method signature
> is big win. For example in refactoring.
I get the feeling that you're essentially describing mypy.
> I know that Python 3 has possibility to have indicate
> type for varibale or param
> What could be great to have possibility to annotate any
> class with what I call "type evaluator" function.
> That could check method signature with rules specific
> for given type.
> The simplest evaluator would simply check if signature
> is same as method definition.
> But it could go futher. It could check whatever is valid
> logic for creating methods in given class and whatever
> are valid params for given method.
> Even more powerful evaluator could be not only
> valid/not valid indicator. It could validate
> and suggest next param or method part name for given
> written part of call. That could make python IDEs
> much more powerful
> From my experience having signature checking and
> hinting params when writing code is really big win.
> I could simply refactor 100000 lines of code in
> Java, but same for Python is much more difficult
> Best regards,
> Marek Mosiewicz
More information about the Python-list