Python Type Hints Mypy

Discussions center on Python's type hints, static type checking with Mypy and alternatives like Pyright/Pyre, including their features, limitations, and comparisons to fully statically typed languages.

➡️ Stable 0.6x Programming Languages
3,858
Comments
18
Years Active
5
Top Authors
#2212
Topic ID

Activity Over Time

2009
2
2010
8
2011
18
2012
27
2013
27
2014
73
2015
93
2016
128
2017
205
2018
204
2019
352
2020
286
2021
450
2022
538
2023
482
2024
334
2025
611
2026
20

Keywords

e.g pypi.org lang.org TypeScript python.org youtu.be PyCharm MyPy objects.get BTW python type hints hinting annotations checker typing typed static type checking

Sample Comments

nkantar Jan 10, 2017 View on HN

Have you tried Python's type hints with Mypy, and so you have any thoughts on it?

londt8 Feb 28, 2019 View on HN

I recommend using mypy for python, type safe python has came a long way. The type annotation syntax has been in the language spec for years

scubbo Mar 11, 2024 View on HN

Python supports types! https://www.mypy-lang.org/

just-ok Apr 22, 2022 View on HN

I believe you're describing MyPy? http://mypy-lang.org/

Does mypy for Python offer a complete solution to introducing static type checking to Python? What is mypy missing that a language with strong static typing has?

sametmax Mar 19, 2017 View on HN

You kinda have this already, it's called mypy.

curiousgal Aug 27, 2023 View on HN

Is it just me or are Python type hints like..goofy?

neuronexmachina Feb 15, 2023 View on HN

What are the main pleasantries missing from Python's type-hinting?

_flux Jun 24, 2025 View on HN

Seems though mypy/pyright/pyre/pyrefly or the future ty could bridge the gap, if one is writing typed python?

hendzen Aug 10, 2016 View on HN

there is a type checker available: http://mypy-lang.org/