Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't know why this is seen with such aversion. This is the language forcing sane coding practices, since you always include what should be cached. Also, the syntactic sugar for except BaseException is to not catch it in your `try ... except` clause. If you do, for example:

>>> try: ... raise TypeError ... except ValueError: ... print("keke") ... raise ...

TypeError will bubble up. If you want to catch everything, and handle it, like the example from Mailman[0], you should catch the base exception anyways.

This can be solved and detected by static analysis tools anyways.

[0]: https://gitlab.com/mailman/mailman/-/blob/master/src/mailman...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: