summaryrefslogtreecommitdiff
path: root/test/functional/unpacked_exceptions.py
blob: 1eb6675f0b6d24554804f3175f29a370330d2e14 (plain)
1
2
3
4
5
6
7
8
9
10
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