Question: I often see comments on other Stack Overflow questions about how the use of `except: pass` is discouraged. Why is this bad? Sometimes I just don't care what the errors are and I want to just continue with the code.

```
try:
    something
except:
    pass

```

Why is using an `except: pass` block bad? What makes it bad? Is it the fact that I `pass` on an error or that I `except` any error?

Answer: 
So, what output does this code produce?

```
fruits = [ 'apple', 'pear', 'carrot', 'banana' ]

found = False
try:
     for i in range(len(fruit)):
         if fruits[i] == 'apple':
             found = true
except:
     pass

if found:
    print "Found an apple"
else:
    print "No apples in list"

```

Now imagine the `try`-`except` block is hundreds of lines of calls to a complex object hierarchy, and is itself called in the middle of large program's call tree. When the program goes wrong, where do you start looking?
Since it hasn't been mentioned yet, it's better style to use [`contextlib.suppress`](https://docs.python.org/3/library/contextlib.html#contextlib.suppress):

```
with suppress(FileNotFoundError):
    os.remove('somefile.tmp')

```

In this example, `somefile.tmp` will be non-existent after this block of code executes without raising any exceptions (other than `FileNotFoundError`, which is suppressed).