1
0
forked from VimPlug/jedi

except can also catch multiple exceptions in one statement

This commit is contained in:
Dave Halter
2014-05-12 18:46:17 +02:00
parent 7096a570bf
commit 00e43d4585
2 changed files with 25 additions and 2 deletions

View File

@@ -21,6 +21,19 @@ try:
except AttributeError:
pass
# -----------------
# multi except
# -----------------
try:
str.not_existing
except (TypeError, AttributeError): pass
try:
str.not_existing
except ImportError:
pass
except (NotImplementedError, AttributeError): pass
# -----------------
# detailed except
# -----------------