3 ms·
You don't really need it, Python 2.7 can already use type comments.
by sametmax 9y ago
You don't really need it, Python 2.7 can already use type comments.
- luch 9y ago(author here) by type comments your mean this : https://www.python.org/dev/peps/pep-0484/#type-comments https://www.python.org/dev/peps/pep-0484/#type-comments ? I haven't seen them used anywhere, but that's an okay solution I guess. NB : by the way, love your blog :p
- carapace 9y agoI was experimenting with them a little while ago, along with MyPy [1] but I immediately ran into an issue where the type system couldn't describe the type I was using, so I had to let it go (reluctantly.) [1] http://mypy-lang.org/ http://mypy-lang.org/
- sametmax 9y agoSame. Mypy was very limited at the beginning, and have been much more improved since. I give it a try regularly. It is indeed way better now, although I'm still structural typing and taking duck typing in consideration.
- sametmax 9y agoYep. Works great. Less convenient than regular type hints, but when you need a transition tool, it's nice. > NB : by the way, love your blog :p Thanks :)