[Python-Dev] Type hints -- a mediocre programmer's reaction

Chris Withers chris at simplistix.co.uk
Tue Apr 21 14:25:34 CEST 2015


On 20/04/2015 19:30, Harry Percival wrote:
> Hi all,
>
> tldr; type hints in python source are scary. Would reserving them for
> stub files be better?

I think Jack's summary of this is excellent and aligns well with where I 
think I'm coming from on this:

https://mail.python.org/pipermail/python-dev/2015-April/139253.html

Harry Also makes just as many good points so I'll reply here, with a 
note that while switching to (type/header/stub - my ordered preference 
for how to describe .pyi files) is preferable to type hints inside 
files, it's still a massive change to the language, not one I can say 
I've missed over the past 15 years, and one if asked to vote on (I know 
that's not the case ;-)) that I would choose to vote against.

Anyway, I've not posted much to python-dev in quite a while, but this is 
a topic that I would be kicking myself in 5-10 years time when I've had 
to move to Javascript or <insert new language here> because everyone 
else has drifted away from Python as it had become ugly...

Chris



More information about the Python-Dev mailing list