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

Python expats needed a place to go.


I don't understand this comment - Python does what I'd argue to be the "right" thing, which is that operations which can fail raise exceptions that unwind the stack. If you don't care to handle failure in a particularly granular or graceful way (e.g., you're a command-line process, or you're a server process with lots of independent requests), you can have one large catch statement around all of your work, or even just use the implicit one around the entire program provided by the runtime.

Meanwhile, well-written C code does this the "wrong" way; every external call has to be done like

    if (read(fd, buf, len) < 0) {
        hopefully remember to free some things;
        return NULL;
    }
Why do you think explicit error handling is a Pythonic practice?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: