1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Nested Try....Except in Python

Discussão em 'Python' iniciado por Stack, Agosto 30, 2025.

  1. Stack

    Stack Membro Participativo

    Are nested try...except statements considered to be bad programming practice? As a little background I am reading a file using multiple one wire temperature sensors, so there are quite a number of potential errors, no subdirectory, no file, no contents in the file, garbage in the file, plus probably a few more I hadn't thought of. I would really like to know which type of error the read generated, which is why I nested several try...except loops. So the program works, but looks ungainly.

    Continue reading...

Compartilhe esta Página