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

Chris Withers chris at withers.org
Tue Apr 21 08:56:42 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 was trying to find Jack's original post as I think his summary 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

However, Harry 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