I hear this question a lot: “Do I raise or return this error in Python?”
This is probably because the right answer will depend on your situation and the goals of your application logic. Either choice can help you ensure your Python code doesn’t fail silently, saving you and your teammates from having to hunt down deeply entrenched errors.
Here’s the difference between `raise` and `return` when handling failures in Python, and how to ensure your code doesn’t fail… https://victoria.dev/blog/do-i-raise-or-return-errors-in-python/
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!