2 likes
·
1.6K reads
3 comments
This is great writing: It's
- concise
- unbiased
- no-nonsense, yet not overly dry
- well structured
- references galore
- clear introduction to the problems faced (love the up-front summaries) and showing workarounds (with just enough code to demonstrate both)
- superb conclusion section
To think that I almost gave up my research before stumbling upon this article.. Thank you!
(Thank you also for saving us at least a month! Inherited a legacy (undocumented) Django 2 project running in production, and bringing it up to date took almost 2 weeks, so we were thinking about adding static type checking. After reading your thorough write-up though, I think we should be happy that the upgrade and subsequent migration went well..:)
Very interesting!
I have started to massively use type hints in 2023 (after almost 11 years of coding with Python). I couldn't agree more with these 2 sentences:
a Python project should be developed with type checks in mind from the start
and:
I can't help but feel the types revolution will drastically change how we code in Python
I am still using the integrated feature of PyCharm for checking type hints. I haven't tried MyPy yet, but I will try one day!
Happy you liked it! And thank you for leaving a comment, it made my day.
Type hints are still in their infancy, but I believe it will become a no brainier soon, given all the PEPs related to type hints.
Pycharm is powerful, but only relying on an IDE is risky, as a wrong type hint is worst than none. I did the same on one of my projects (pycharm only) and was surprised how many mistakes I made when I turned on mypy.
If you like the subject, have a look at my latest article discussing changes to type annotations blog.derlin.ch/python-type-hints-and-futur…