by crazypython · 5y ago · 0 comments
def sum(a: int, b: int) -> int: ...
Unlike Ruby and JavaScript, Python is strongly typed. You can't add a string to a number, for example. Because it's strongly typed, it's much easier to add a type system. When I first started using the type system, it felt like it was always a part of the language, they just added a syntax and a checker. It doesn't restrain me from what I would otherwise normally do in the language like TypeScript or Flow does. It's a perfect fit.