forked from VimPlug/jedi
except can also catch multiple exceptions in one statement
This commit is contained in:
@@ -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
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user