[Python-Dev] Is static typing still optional?

Mike Miller python-dev at mgmiller.net
Wed Dec 20 18:57:19 EST 2017


On 2017-12-19 02:53, Paul Moore wrote:
> Also, the fact that no-one raised this issue during the whole time the
> PEP was being discussed (at least as far as I recollect) and that
> Guido (who of all of us should be most aware of what is and isn't
> acceptable use of annotations in the stdlib) approved the PEP,
> suggests to me that this isn't that big a deal.


Hi, I asked about this in the first posting of the PEP and agree with Chris.

     https://mail.python.org/pipermail/python-dev/2017-September/149406.html


There is definitely a passive bias towards using types with dataclasses in that 
the Eric (the author) doesn't appear to want an example without them in the 
pep/docs.

It seems that typing proponents are sufficiently enamored with them that they 
can't imagine anyone else feeling differently, haha.

Personally, I wouldn't use types with Python unless I was leading a large 
project with a large team of folks with different levels of experience.  That's 
where types shine, and those folks might be better served by Java or Kotlin.

So we hearing that "types are optional" while the docs may imply the opposite. 
Liked the ellipsis since None is often used as a sentinel value and an extra 
import is a drag.

-Mike


More information about the Python-Dev mailing list