syntax difference

Schachner, Joseph Joseph.Schachner at Teledyne.com
Mon Jun 18 17:36:20 EDT 2018


On YouTube you can watch videos of Guido van Rossum presenting at PyCon from a few years ago, in which he makes clear that he has been thinking about this since 2000, that he wants someone else to guide this PEP along its path because he is too close to it, and that NOTHING about having a typing module requires you to use it.  In fact, you can use it without affecting your source code and interleaving the (helpful) information into the source code.  They support "stub" files, with a ".pyi" extension, in which you can place the declarations with the typing information.   The type checker will read that an use it along with your unmodified source code to do its checking.  He also thanked multiple people for their contributions bringing this from an idea to a preliminary implementation in 3.5 and now possibly final form in 3.6.6rc1.  

Now that you know that 1) You are not required to modify your source code at all, even if you want to get full utility from typing, and 2) you really don't have use typing at all, nothing forces you to,  and 3) it's been developed by the Python community for years and was proposed by Guido years before he went to DropBox,  does that help?

-- Joe S.

-----Original Message-----
From: Rick Johnson <rantingrickjohnson at gmail.com> 
Sent: Monday, June 18, 2018 1:16 PM
To: python-list at python.org
Subject: Re: syntax difference

Steven D'Aprano wrote:
> Moving the type-checking out of the core language into the IDE or 
> linter which can be used or not used according to the desire of the 
> programmer

Except, what your poppycock commentary seems to glaze over is the fact that whilst a programmer can certainly decided to "use or not use" the type-hints feature in his or her own code, he or she certainly cannot "see or _unsee_" type-hints that are written by other programmers.




More information about the Python-list mailing list