3 ms·
(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
by 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 :)