projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a53a17e
)
add test case
author
Stefan Behnel
<stefan_ml@behnel.de>
Mon, 31 Dec 2012 10:08:08 +0000
(11:08 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Mon, 31 Dec 2012 10:08:08 +0000
(11:08 +0100)
tests/run/dict_values_in_expression.pyx
patch
|
blob
|
history
diff --git
a/tests/run/dict_values_in_expression.pyx
b/tests/run/dict_values_in_expression.pyx
index
6ca8a55
..
dedfc96
100644
(file)
--- a/
tests/run/dict_values_in_expression.pyx
+++ b/
tests/run/dict_values_in_expression.pyx
@@
-1,7
+1,18
@@
-def
func
(**kwargs):
+def
values_in_expression
(**kwargs):
"""
- >>> sorted(
func
(a=3, b=4))
+ >>> sorted(
values_in_expression
(a=3, b=4))
[1, 2, 3, 4]
"""
return [ arg for arg in [1,2] + kwargs.values() ]
+
+
+cdef dict make_dict(d):
+ return dict(d)
+
+def values_of_expression(**kwargs):
+ """
+ >>> sorted(values_of_expression(a=3, b=4))
+ [3, 4]
+ """
+ return [ arg for arg in make_dict(kwargs).values() ]