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

So the Python script proposed in this article really just skips all error checking and will die just the same as the hard unwrapped Rust version with the only benefit it actually produces a more user-friendly error and it doesn't look as ugly.

I can't edit my reply anymore but the question was actually meant to be rhetorical rather than I really wanted an answer.



> So the Python script proposed in this article really just skips all error checking

Only if the programmer chooses to not handle exceptions, which is bad practice.

>and will die just the same as the hard unwrapped Rust version with the only benefit it actually produces a more user-friendly error and it doesn't look as ugly.

No, it won't die unless the programmer wants it to. In Python you can catch an exception and continue the operation in a different manner. In fact, it is common practice in a lot of Python libraries to use exceptions to determine the presence of data and act according to whether or not the exception occurred. If I'm not mistaken, I believe that this is common practice in most languages that utilize the exception pattern.

> I can't edit my reply anymore but the question was actually meant to be rhetorical rather than I really wanted an answer.

Well, you seem to not know a lot about exception handling in Python, so I hope I was at least a little helpful.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: