From e03c879b24252675c59fa5bc843cbd699d6a4d6d Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 3 May 2009 13:09:52 +0200 Subject: [PATCH] test typed lambda expressions --- tests/run/lambda_T195.pyx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/run/lambda_T195.pyx b/tests/run/lambda_T195.pyx index 32481108..b2e61ac8 100644 --- 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 -- 2.26.2