Re:Reasons Python Sucks
by quodlibetor on Tuesday December 18, 2018 @11:40PM
(#18713051)
> I've come across a few cases, when pushing python's type annotations to their limits, that force you to put the type names in string quotes
With pep-0563, python3.7, and `from __future__ import annotations` this should no longer be necessary. Those are some pretty detailed caveats, but I have been using it in places where I can and it is so nice.
On a general note I've come across a few cases, when pushing python's type annotations to their limits, that force you to put the type names in string quotes, and that makes the whole thing feel like a hack. It's better than nothing for my use cases, but if I remember correctly both mypy and enforce have problems in common that are probably coming from the way python itself is built, such as self reference in a class definition.