Source

talks / python-gotchas / src / except_fixed.py

Full commit
1
2
3
4
5
try:
    raise ValueError
except (IndexError, ValueError) as e:  # <1>
    print('oops')
# => oops