Commit b79a55d8 authored by Stefan Behnel's avatar Stefan Behnel

use C values in if-else expression test instead of Python values

parent fbd72ec9
...@@ -25,6 +25,7 @@ def temps(x): ...@@ -25,6 +25,7 @@ def temps(x):
""" """
return ident(1) if ident(x) < ident(5) else ident(10) return ident(1) if ident(x) < ident(5) else ident(10)
def nested(x): def nested(x):
""" """
>>> nested(1) >>> nested(1)
...@@ -34,7 +35,9 @@ def nested(x): ...@@ -34,7 +35,9 @@ def nested(x):
>>> nested(3) >>> nested(3)
3 3
""" """
return 1 if x == 1 else (2 if x == 2 else 3) a = 1 if x == 1 else (2 if x == 2 else 3)
return a
@cython.test_fail_if_path_exists('//CondExprNode') @cython.test_fail_if_path_exists('//CondExprNode')
def const_true(a,b): def const_true(a,b):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment