Most importantly, static type checking is still immature and as yet there is no standard for how to say "this thing is an X". Adding type hints into the stdlib source would force you to choose one (third party) tool, https://typing.readthedocs.io/en/latest/#type-checkers , which then would lock you into the design of that tool, promoting it above all others. Sure, most people would pick mypy, but then what happens to users of any of the others? Do we want to force the other tools into mypy's philosophy, thus stunting their potential innovations?
On Wed, Mar 16, 2022 at 3:57 AM Jared Crawford <jmcrawfor...@gmail.com> wrote: > Hi all, > > I recently noticed that stdlib functions often don't have type hints. Is > there a technical reason why typing isn't more widespread in the cpython > implementation? As a developer, it'd be great if I didn't have to wrap many > of my stdlib calls in casts to make mypy happy. Please let me know if > there's a more appropriate channel for this discussion. I tried looking > through the mailing list archives and github issues, but I couldn't find > the answer to this. > > Best, > Jared > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/3W43OKUUPVECIJMRTH7XVPFZCG7GFOVE/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HKJEYW4FF7KRG6XEE5ZUWEQIQKLQDSAE/ Code of Conduct: http://python.org/psf/codeofconduct/