summaryrefslogtreecommitdiff
path: root/test/input/func_w0623_py30.py
blob: 163256b131d6d4eb18ee64267f1539ba25136ee0 (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 as some_function: # W0623
        pass