3 ms·
That's because a great deal of Django was written before type hints or even dataclasses existed.
by simonw 3y ago
That's because a great deal of Django was written before type hints or even dataclasses existed.
- Hamuko 3y agoAnd type hints aren't really that mature yet. If you look at the `typing` module's documentation in Python 3.11, there's 23 occurrences of the string "Changed in version". And the Python 3.12 version of the same document adds 9 more. Type hinting in Python is constantly evolving.
- walthamstow 3y agoThat's the main reason we haven't adopted it at my place. We do have types of args and returns in docstrings though and it is enough for IDEs to do checks and suggestions from those types.