
On 11/30/2021 1:16 AM, Guido van Rossum wrote:
Why would it need to be reiterated? Are there really people who believe that such code would become invalid? AFAIK *everybody* here agrees that this should stay valid. So who would we be reiterating it for?
(Yes, several static type checkers have options that cause the checker to complain about unannotated code. But that's not the default behavior and running a static checker is a choice, like running a linter. Three-space indents or capitalized function names are never going to be disallowed either, even though PEP 8 says that's not how you ought to code.)
I know it sounds like a straw-man argument, but I don't think it is. I just think the non-straw-men making the argument aren't "important" enough to call out specifically - they are "random individual programmers who have gotten the wrong impression from another language and applied it to Python" rather than "influencers trying to change how we code".[1] And we can always say that the *language* does not require running the type checker, but the reality for many developers is that the projects and teams they are part of will require it. And often, they require it because it's some kind of global "Best Practice" rather than because it makes sense for their particular situation. For example, I saw a snippet fly by on Twitter the other day (again, not the fault of the individual who posted it, so I'm not naming-and-shaming) showing how to use Black to format a big directory of Jupyter notebooks. Convenient, perhaps, but the vast majority of people with "big directories of Jupyter notebooks" are going to be much happier if you just leave them alone! And yet, "The Community" is suggesting we should format all of them in bulk. THAT'S the kind of thing that also has been happening with typing, and why some of us feel the need to publicly re-state things that are all agreed upon within this group, but are struggling to be heard over the public discourse on the topics. And this kind of reiteration is easier when our official documents (PEPs, etc.) state it explicitly. Cheers, Steve [1]: Okay, I will call out the Python Bytes podcast - which I've been on a couple of times - as one that regularly opines on topics based on very little information and says things more definitively than they've been said anywhere else. They have a much bigger (and more easily influenced) audience than python-dev. I'll also say that what I see from LWN is generally very good in this respect, their writers handle things well. Though I don't tend to read or listen to either of these that often.