[Python-ideas] Proposal: Use mypy syntax for function annotations

Nick Coghlan ncoghlan at gmail.com
Thu Aug 14 10:13:37 CEST 2014


On 14 August 2014 15:11, Guido van Rossum <guido at python.org> wrote:
> On Wed, Aug 13, 2014 at 6:09 PM, Gregory P. Smith <greg at krypto.org> wrote:
>>
>> At the summit in Montreal earlier this year Łukasz Langa (cc'd)
>> volunteered to lead writing the PEP on Python type hinting based on the many
>> existing implementations of such things (including mypy, cython, numba and
>> pytypedecl). I believe he has an initial draft he intends to send out soon.
>> I'll let him speak to that.
>
>
> Mypy has a lot more than an initial draft. Don't be mistaken by its status
> as "one person's Ph.D. project" -- Jukka has been thinking about this topic
> for a decade, and mypy works remarkably well already. It also has some very
> active contributors already.

FWIW, I was strongly encouraging folks at SciPy that were interested
in static typing to look at mypy as an example of a potentially
acceptable syntax for standardised optional static typing.

Aside from being +1 on the general idea of picking *something* as
"good enough" and iterating from there, I don't have a strong personal
opinion, though.

(And yes, my main interest is in improving the ability to do effective
linting for larger projects. "pylint -E" is a lot better than nothing,
but it has its limits in the absence of additional static hints)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list