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

Ryan Gonzalez rymg19 at gmail.com
Mon Apr 20 22:59:26 CEST 2015


Only if you want Java users burning all written copies of the PEP...

On Mon, Apr 20, 2015 at 2:37 PM, Isaac Morland <ijmorlan at uwaterloo.ca>
wrote:

> On Mon, 20 Apr 2015, Paul Moore wrote:
>
>  On 20 April 2015 at 19:41, Barry Warsaw <barry at python.org> wrote:
>>
>>> tldr; type hints in python source are scary. Would reserving them for
>>>> stub
>>>> files be better?
>>>>
>>>
>>> I think so.  I think PEP 8 should require stub files for stdlib modules
>>> and
>>> strongly encourage them for 3rd party code.
>>>
>>
>> Agreed. I have many of the same concerns as Harry, but I wouldn't have
>> expressed them quite as well. I'm not too worried about actually
>> removing annotations from the core language, but I agree that we
>> should create a strong culture of "type hints go in stub files" to
>> keep source files readable and clean.
>>
>> On that note, I'm not sure "stub" files is a particularly good name.
>> Maybe "type files" would be better? Something that emphasises that
>> they are the correct place to put type hints, not a workaround.
>>
>
> How about "header" files?
>
> (ducks...)
>
> Isaac Morland           CSCF Web Guru
> DC 2619, x36650         WWW Software Specialist
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/rymg19%40gmail.com
>



-- 
Ryan
[ERROR]: Your autotools build scripts are 200 lines longer than your
program. Something’s wrong.
http://kirbyfan64.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150420/a1eb3dae/attachment-0001.html>


More information about the Python-Dev mailing list