Commit 970dc0d6 authored by Vitja Makarov's avatar Vitja Makarov

Don't use print() inside w_unitialized_py3 test, that doesn't work for python < 2.6

parent 5716d1ef
...@@ -2,20 +2,23 @@ ...@@ -2,20 +2,23 @@
# mode: error # mode: error
# tag: werror # tag: werror
def ref(obj):
pass
def list_comp(a): def list_comp(a):
r = [i for i in a] r = [i for i in a]
print(i) ref(i)
i = 0 i = 0
return r return r
def dict_comp(a): def dict_comp(a):
r = {i: j for i, j in a} r = {i: j for i, j in a}
print(i) ref(i)
i = 0 i = 0
return r return r
_ERRORS = """ _ERRORS = """
7:11: local variable 'i' referenced before assignment 10:9: local variable 'i' referenced before assignment
13:11: local variable 'i' referenced before assignment 16:9: local variable 'i' referenced before assignment
""" """
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment