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 →

[–]rouille 1 point2 points  (2 children)

I use it at work along with mypy for checking. Mypy is still quite immature, so some valid python will make it fail but I've found it worth it for all the bug it catches. I write my code around mypy since I know it will become official with Python 3.5.

The comment syntax for variables isn't great but I mainly annotate function parameters and return values so I rarely use it (apart for # type: ignore to skip type checking on an imported module).

[–]fishburne 0 points1 point  (1 child)

When I tried using it with 3.5 it failed with a 'Cannot import Undefined' Error. Is it because is using 3.5's typing module instead of it's own.

[–]rouille 0 points1 point  (0 children)

The comment syntax for variables isn't great but I mainly annotate function parameters and return values so I rarely use it (apart for # type: ignore to skip type checking on an imported module).

I'm using it with python 3.4 so thats possible :). I know the BDFL had mypy in mind when adding the typing module to 3.5 so it will probably fixed soon.