News for hackers. Stuff that matters.
Re:Ask HN: Why Did Python Win? by woodruffw on Tuesday August 29, 2023 @08:54PM (#37316263)
The two are complementary: the built-in `typing` module only provides type annotations, not type checking. Mypy provides the latter, via the type annotations that you (and others) add to Python codebases.

Pydantic overlaps with mypy in the sense that it provides a mypy plugin, but otherwise it's just like any other Python library.

Re:Ask HN: Why Did Python Win? by mardifoufs on Tuesday August 29, 2023 @09:10PM (#37316388)
So mypy runs "at run time"? I guess that makes sense, I thought the annotations provided some form of checking too, but now I realize that I should really spend some time to inform myself better :').
Re:Ask HN: Why Did Python Win? by woodruffw on Tuesday August 29, 2023 @09:23PM (#37316496)
Sort of -- mypy is its own standalone program, and you run it to typecheck your program's type annotations. It does some evaluation of the Python program (specifically imports and some very basic conditional evaluation, among other things), but it never really executes the codebase itself.
Re:Ask HN: Why Did Python Win? by stableviper on Tuesday August 29, 2023 @09:22PM (#37316477)
No, it's more that pydantic runs "at run time" while mypy not.
Re:Ask HN: Why Did Python Win? by gabereiser on Wednesday August 30, 2023 @12:48AM (#37317799)
Mypy runs as a type linter/checker. See https://mypy-lang.org/