summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/generator_name.py
blob: 77259a8218a3dbf39ff85650d3214315b028978d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# test __name__ on generator functions

def Fun():
    yield

class A:
    def Fun(self):
        yield

try:
    print(Fun.__name__)
    print(A.Fun.__name__)
    print(A().Fun.__name__)
except AttributeError:
    print('SKIP')
    raise SystemExit