Fix error line numbers (due to tag additions).
[cython.git] / tests / errors / extended_unpacking_parser.pyx
1 # mode: error
2
3 # wrong size RHS (as handled by the parser)
4
5 def length1():
6     a, b = [1,2,3]
7
8 def length2():
9     a, b = [1]
10
11 def length3():
12     a, b = []
13
14 def length4():
15     a, *b = []
16
17 def length5():
18     a, *b, c = []
19     a, *b, c = [1]
20
21 def length_recursive():
22     *(a, b), c  = (1,2)
23
24
25 _ERRORS = u"""
26 6:4: too many values to unpack (expected 2, got 3)
27 9:4: need more than 1 value to unpack
28 12:4: need more than 0 values to unpack
29 15:4: need more than 0 values to unpack
30 18:4: need more than 0 values to unpack
31 19:4: need more than 1 value to unpack
32 22:6: need more than 1 value to unpack
33 """