Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
484b5d8c
Commit
484b5d8c
authored
Apr 10, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended test case
parent
f17abb85
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
tests/errors/extended_unpacking.pyx
tests/errors/extended_unpacking.pyx
+26
-10
No files found.
tests/errors/extended_unpacking.pyx
View file @
484b5d8c
...
...
@@ -3,7 +3,6 @@
def
syntax1
():
a
=
b
=
c
=
d
=
e
=
f
=
g
=
h
=
i
=
1
# prevent undefined names
list_of_sequences
=
[[
1
,
2
],
[
3
,
4
]]
*
a
...
...
@@ -17,18 +16,35 @@ def syntax1():
(
a
,
b
,
*
c
,
d
,
e
,
f
,
*
g
,
h
,
i
)
def
syntax2
():
list_of_sequences
=
[[
1
,
2
],
[
3
,
4
]]
for
*
a
,
*
b
in
list_of_sequences
:
pass
def
types
(
l
):
cdef
int
a
,
b
a
,
*
b
=
(
1
,
2
,
3
,
4
)
a
,
*
b
=
l
_ERRORS
=
u"""
8: 4: can use starred expression only as assignment target
10: 4: can use starred expression only as assignment target
12: 4: can use starred expression only as assignment target
14: 4: can use starred expression only as assignment target
16: 5: can use starred expression only as assignment target
16: 9: can use starred expression only as assignment target
18:11: can use starred expression only as assignment target
18:24: can use starred expression only as assignment target
20:11: more than 1 starred expression in assignment
# syntax1()
7: 4: can use starred expression only as assignment target
9: 4: can use starred expression only as assignment target
11: 4: can use starred expression only as assignment target
13: 4: can use starred expression only as assignment target
15: 5: can use starred expression only as assignment target
15: 9: can use starred expression only as assignment target
17:11: can use starred expression only as assignment target
17:24: can use starred expression only as assignment target
# syntax2()
23:11: more than 1 starred expression in assignment
# types()
29:15: Cannot coerce list to type 'int'
30:10: starred target must have Python object (list) type
"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment