projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
625963e
)
test typed lambda expressions
author
Stefan Behnel
<scoder@users.berlios.de>
Sun, 3 May 2009 11:09:52 +0000
(13:09 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sun, 3 May 2009 11:09:52 +0000
(13:09 +0200)
tests/run/lambda_T195.pyx
patch
|
blob
|
history
diff --git
a/tests/run/lambda_T195.pyx
b/tests/run/lambda_T195.pyx
index 32481108023aaa80b3ad102fe2b8b5f0e2075774..b2e61ac8a46c4c6a145435b702096e31b9dc1504 100644
(file)
--- a/
tests/run/lambda_T195.pyx
+++ b/
tests/run/lambda_T195.pyx
@@
-27,6
+27,15
@@
__doc__ = u"""
>>> make_lambda_lambda(1)(2)(4)
7
+
+>>> make_typed_lambda_lambda(1)(2)(4)
+7
+
+>>> partial_lambda = make_typed_lambda_lambda(1)(2)
+>>> partial_lambda(4)
+7
+>>> partial_lambda(5)
+8
"""
#cy_identity = lambda x:x
@@
-51,4
+60,9
@@
def make_const_calc1_xy(x):
return lambda y: x*y+(1*2*3+5)
def make_lambda_lambda(x):
- return lambda y : lambda z:x+y+z
+ return lambda y : \
+ lambda z:x+y+z
+
+def make_typed_lambda_lambda(int x):
+ return lambda int y : \
+ lambda int z:x+y+z