3 ms·
I've been using the type hinting introduced in Python 3 and it works very well. I just wish that there was a way to check/verify the annotations. They work very
by LaurensBER 9y ago
I've been using the type hinting introduced in Python 3 and it works very well. I just wish that there was a way to check/verify the annotations. They work very well as documentation right now but not so much for preventing bugs.
The MyPy support for Django is severely lacking.
I've been thinking about writing a decorator to check this in development (should be doable) but then I would have to decorate every function and I really do not want to do that.
- vonseel 9y agoI love type hinting! Also using it quite a bit. Although, that's part of my desire to work with a stronger-typed language... I'm putting in all this effort to annotate Python, I'd probably get much higher application performance and I'd assume it's more efficient for the IDE to introspect a typed language than a loosely-annotated one. And, playing around with things like Swing or Play, the whole ecosystem feels much more mature right out of the box.