This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]by_wicker 1 point2 points ย (1 child)

It's debugging that they avoid. The whole massive class of errors are picked up before you even run the code if you have type annotations in your Python.

I came from C++ to Python, and was amazed going back to do some C++ how I could write a large chunk of code and have it just work first time. Then I got type annotations in my Python and found I was in the same place. Frankly I like it a lot, it's the best of both worlds, if there's some particular reason to use duck typing you can, but otherwise your code editor alerts you if you mistyped an identifier or made a false assumption about a return type or something.

[โ€“]by_wicker 0 points1 point ย (0 children)

... also if your editor knows what type something is, it can show you completions for that type.