From: Stefan Behnel Date: Sat, 16 Feb 2008 16:53:03 +0000 (+0100) Subject: compile-time DEF test X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b8884aaa64fd269c3f87f827df4c37ba0dcc3f8d;p=cython.git compile-time DEF test --- diff --git a/tests/run/compiledef.pyx b/tests/run/compiledef.pyx new file mode 100644 index 00000000..f943df3b --- /dev/null +++ b/tests/run/compiledef.pyx @@ -0,0 +1,25 @@ +__doc__ = """ + >>> t + True + >>> f + False + >>> boolexpr + + >>> num6 + 6 + >>> intexpr + 10 +""" + +DEF c_t = True +DEF c_f = False +DEF c_boolexpr = c_t and True and not (c_f or False) + +DEF c_num6 = 2*3 +DEF c_intexpr = c_num6 + 4 + +t = c_t +f = c_f +boolexpr = c_boolexpr +num6 = c_num6 +intexpr = c_intexpr