summaryrefslogtreecommitdiff
path: root/test/input/func_w0623_py30.py
blob: f6c5f57be2803acc4d61a70ad41f1f329fe73218 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Test for W0623, overwriting names in exception handlers."""

__revision__ = ''

class MyError(Exception):
    """Special exception class."""
    pass


def some_function():
    """A function."""

    try:
        {}["a"]
    except KeyError, some_function: # W0623
        pass