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 :').
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/
Pydantic overlaps with mypy in the sense that it provides a mypy plugin, but otherwise it's just like any other Python library.