gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / input / func_noerror_yield_assign_py25.py @ 745
History | View | Annotate | Download (387 Bytes)
1 |
"""http://www.logilab.org/ticket/8771"""
|
---|---|
2 |
|
3 |
from __future__ import print_function |
4 |
|
5 |
def generator(): |
6 |
"""yield as assignment"""
|
7 |
yield 45 |
8 |
xxxx = yield 123 |
9 |
print(xxxx) |
10 |
|
11 |
def generator_fp1(seq): |
12 |
"""W0631 false positive"""
|
13 |
for val in seq: |
14 |
pass
|
15 |
for val in seq: |
16 |
yield val
|
17 |
|
18 |
def generator_fp2(): |
19 |
"""E0601 false positive"""
|
20 |
xxxx = 12
|
21 |
yield xxxx
|