On 24/01/2015 15:09, Mario Figueiredo wrote:
>def myfunction(arg1, arg2):
> """
> Normal docstring.
> @typehint: (str, int) -> bool"""
> return True
>
>One of the problems with this is that it put the information about
>parameters far away from the parameter list itself.
Then move it to the first line of the docstring...
I like this idea, because nevertheless the type hinting is optional, the
mypy syntax affects every Python programmer who has to read other code
that will use this syntax, while the docstring one does not.
--
Marco Buttu
INAF-Osservatorio Astronomico di Cagliari
Via della Scienza n. 5, 09047 Selargius (CA)
Phone: 070 711 80 217
Email: mbu...@oa-cagliari.inaf.it
--
https://mail.python.org/mailman/listinfo/python-list