Hacker News new | ask | show | jobs
by wbond 3347 days ago
Ever since mypy started gaining attention, I’ve been looking for a way to write using Python 3 annotations and strip the annotations for release so that the code can run on Python 2.

I never was able to find anyone talking about that goal with mypy, but it looks like this tool may be a solution.

1 comments

Use the comment syntax for type annotations. They are compatible with both versions.
I didn’t like the idea of moving the annotations out-of-band with the parameter names. Aesthetically you also loose syntax highlighting.