diff options
Diffstat (limited to 'pylint/test/functional/unpacked_exceptions.py')
-rw-r--r-- | pylint/test/functional/unpacked_exceptions.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pylint/test/functional/unpacked_exceptions.py b/pylint/test/functional/unpacked_exceptions.py new file mode 100644 index 0000000..1eb6675 --- /dev/null +++ b/pylint/test/functional/unpacked_exceptions.py @@ -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): + print new_style, tuple # pylint: disable=print-statement |