summaryrefslogtreecommitdiff
path: root/pylint/test/input/func_noerror_yield_assign_py25.py
blob: f40d8d96e837e9022fc2596b23ce8733990a450c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""http://www.logilab.org/ticket/8771"""

from __future__ import print_function

def generator():
    """yield as assignment"""
    yield 45
    xxxx = yield 123
    print(xxxx)

def generator_fp1(seq):
    """W0631 false positive"""
    for val in seq:
        pass
    for val in seq:
        yield val

def generator_fp2():
    """E0601 false positive"""
    xxxx = 12
    yield xxxx