Mypy is still in development. Most Python features are supported.
Mypy 0.501 released
1 Mar 2017: Mypy 0.501 was released. It switches to a new default parser and supports Python 3.6 features by default. These are also many other improvements and fixes. Read the blog post to see what's changed. -Jukka
Mypy 0.470 released
13 Jan 2017: Mypy 0.470 was released. This release release switches to the PyPI package name "mypy" instead of "mypy-lang" and switches to a new version numbering scheme. It also includes many other improvements and fixes. Read the blog post to see what's changed. -Jukka
Mypy 0.4.6 released
21 Nov 2016: Mypy 0.4.6 was released. This release adds support for generic type aliases, missing return statement detection and self types. It also improves type checking of import cycles and includes many other improvements and fixes. Read the blog post to see what's changed. -Jukka
Mypy 0.4.5 released
7 Oct 2016: Mypy 0.4.5 was released. This release adds support for mypy configuration files and Python 3.6 variable annotations and includes many other improvements and fixes. There is now also a Gitter chat room. Read the blog post to see what's changed. -Jukka
def fib(n): a, b = 0, 1 while a < n: yield a a, b = b, a+b
def fib(n: int) -> Iterator[int]: a, b = 0, 1 while a < n: yield a a, b = b, a+b
Migrate existing code to static typing, a function at a time. You can freely mix static and dynamic typing within a program, within a module or within an expression. No need to give up dynamic typing — use static typing when it makes sense. Often just adding function signatures gives you statically typed code. Mypy can infer the types of other variables.
Mypy type checks programs that have type annotations conforming to PEP 484. Getting started is easy if you know Python. The aim is to support almost all Python language constructs in mypy.
Mypy has a powerful, modern type system with features such as bidirectional type inference, generics, callable types, abstract base classes, multiple inheritance and tuple types.
Many commonly used libraries have stubs (statically typed interface definitions) that allow mypy to check that your code uses the libraries correctly.