8th day of python challenges 111-117

This commit is contained in:
abd.shallal
2019-08-04 15:26:35 +03:00
parent b04c1b055f
commit 627802c383
3215 changed files with 760227 additions and 491 deletions

View File

@@ -0,0 +1,11 @@
"""Test for redefine-in-handler, overwriting names in exception handlers."""
def new_style():
"""Some exceptions can be unpacked."""
try:
pass
except IOError, (errno, message): # [unpacking-in-except]
print errno, message # pylint: disable=print-statement
# +1: [redefine-in-handler,redefine-in-handler,unpacking-in-except]
except IOError, (new_style, tuple): # pylint: disable=duplicate-except
print new_style, tuple # pylint: disable=print-statement