On 05/08/17 16:48, bruce wrote:
> redid a search just now. found a bunch of sites that said it's
> doable.. embarrased
Just because its doable doesn't mean you should though...
Bare except clauses can hide a multitude of sins. Unless its
at the top level of your program and you use it to log
any errors that occur its probably a bad idea.
Much better to be as specific as possible and catch only
anticipated errors. Anything else will then cause a crash
and you can investigate the (unanticipated) cause.
Note, you can link multiple error types in a single
except (Error2, Error3, Error4):....
Author of the Learn to Program web site
Follow my photo-blog on Flickr at:
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options: