2 Matching Annotations
  1. Aug 2025
    1. This won't trigger an error in Python, though. You have to use a type checker like mypy, pyright, or ty to get the warning. But it's a lightweight alternative, and even without tooling, it tells other programmers what parts of the program do what.

      oh neat, so basically the NewType thing is a way to be more explicit about what a function is expecting, without needing to spend loads of time defining a dataclass and so on - it's a bit like annotating an existing type like a string, in a way that subsequent functions fo look for

  2. Nov 2020
    1. Once the person opens up about what they’re feeling, resist the temptation to find a solution. Instead, validate. McGrath suggests telling them their emotions makes sense, reiterating how hard their experience sounds, then asking what they need.If you’re burning to share how you see things, ask permission before dishing out advice. Sometimes, well-intentioned attempts to fix the problem send a message that you’re uncomfortable with the other person’s emotions, which does anything but forge trust and connection.

      Something I need to practice more.

      When someone opens up, do not be so quick to fix. Understand the issue, what is causing them pain, why it is causing them pain, and validate that concern by reiterating the experience to them.

      This way you allow them to not feel like they are wrong for feeling that way.