On Dec 30, 7:23 am, Jean-Michel Pichavant <jeanmic...@sequans.com> wrote:
> Rule N°2: > dont use BARE EXCEPT, or you'll piss off MRAB for good :o). Beside from > kidding, don't use bare except. I inherited some code that used bare excepts *everywhere*. There were about 4K lines of code, IIRC, and I think that they were more except clauses than elses. Eventually, I used sed to add a print_exc() after each one, just so I could figure out what the expected exceptions were. It was so bad that I seriously considered writing a program just to parse all the tracebacks from my instrumented version and then revise the source code for me, but I didn't want to accidentally miss any "real" errors. -- http://mail.python.org/mailman/listinfo/python-list