1. 9
  1. 3

    There’s also a Django Enhancement Proposal to add type hints to Django core. It’s more up-to-date with the current state of things then this almost one year old article is.

    1. 1

      Thanks, I’ve already read the “DEP 0484: Static type checking for Django”

      The article I shared talk about something different and more in theory.

      1. 2

        I think people are getting tripped up by the title, which is misleading – the article is really a thought experiment on “what if we ripped out the current way Django defines models and replaced it with something more like Python 3.7 dataclasses”. Which, while not a bad thought experiment, is something that’s extremely unlikely to ever happen because of what a huge backwards-incompatible change it would be.

    2. 3

      I use Django a lot for personal projects, but I haven’t really gotten into type hints in Python.

      At work, I use a statically typed ORM, NHibernate (for C#, .NET). For me, the main advantage of this is not catching bugs at compile time, but the editor tooling. My editor knows the types of return values from queries, and so I get completion, flycheck, and so on and so on. If using type hints in Python will get me this (in Emacs), then I’m on board. Otherwise, meh.

      1. 2

        Zulip add type to their models using the comment syntax.