Creating type evaluation annotation

Terry Reedy tjreedy at udel.edu
Thu Dec 6 13:05:09 EST 2018


On 12/6/2018 5:48 AM, 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 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.

This and the following needs simple concrete examples.  Withing such, my 
eyes glaze over.

> 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
> 
> 


-- 
Terry Jan Reedy




More information about the Python-list mailing list