Creating type evaluation annotation

Marek Mosiewicz marek.mosiewicz at jotel.com.pl
Mon Dec 10 04:01:32 EST 2018


W dniu 09.12.2018, nie o godzinie 15∶50 -0500, użytkownik Terry Reedy
napisał:
> 
> Mypy recognizes this sublanguage to 'compute' whether calls conform
> to 
> the defined interfaces.
> 
As far as I understand currently it computes if declaration commits to
static type. What I propose is to annotate type with "duck" typing
checker and futher it could make suggester for duck typing. We can
imagine duck typing suggester for imaginary entity class which accepts
finders like in Ruby on rails : "find_by_name" "find_by_id"
"find_by_name_and_something"

Then when you type "find_" it will suggest futher method name. When you
finish typing "find_by_name_and_length" for example it will force you
to put two paramters of type string and int
> 
> -- 
> Terry Jan Reedy
> 



More information about the Python-list mailing list