News for hackers. Stuff that matters.
Re:Python type hints may not be not for me in practice by kstrauser on Thursday November 28, 2024 @02:12AM (#42263160)
A lot of the old robust code tended to have guard statements like “if not isinstance(…): raise ValueError”, which does a great job of surfacing mistakes before they can compound too much. We all wrote scads of production Python over the decades before typing caught on. I think it’s much easier to do a good job of it now. Having your IDE yell at you before you’ve even finished saving the file sure beats running it and hoping for the best.

There are no comments on this comment yet.