4 ms·
> Typing Python that wasn't written with type hints in the first place is always going to be a complete nightmare though Couldn’t agree more. I joined a new te
by flakes 3y ago
> Typing Python that wasn't written with type hints in the first place is always going to be a complete nightmare though
Couldn’t agree more. I joined a new team and recently finished converting a 20K line repo. It was a grueling grind to get mypy running in strict mode.
I’m continually finding that a huge benefit of typed python code isn’t autocomplete or catching bad argument passing, but preventing developers from creating patterns that are unmaintainable.
If your code is too complex to type correctly, its probably too complex in general :)
- deleted 3y ago[deleted]
- IshKebab 3y ago> If your code is too complex to type correctly, its probably too complex in general :) Ha I definitely agree with that. There are some exceptions where you want to do a reasonable thing that the types just aren't expressive enough for, but in general if you can't explain it so the type checker understands then your coworkers won't either.