From: Dag Sverre Seljebotn Date: Thu, 15 Oct 2009 07:14:33 +0000 (+0200) Subject: Testcase for #373 X-Git-Tag: 0.13.beta0~2^2~121^2~52^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=12ad1ee88190bd5d76dd30f29adfe6abfd5c4236;p=cython.git Testcase for #373 --- diff --git a/tests/run/typeddefaultargT373.pyx b/tests/run/typeddefaultargT373.pyx new file mode 100644 index 00000000..bfb6047a --- /dev/null +++ b/tests/run/typeddefaultargT373.pyx @@ -0,0 +1,17 @@ +import math + +cdef class MyClass: + """ + >>> x=MyClass() + 4 + """ + def __cinit__(self, int arg=2*2): + print arg + +cdef class MyOtherClass: + """ + >>> x=MyOtherClass() + 8 + """ + def __cinit__(self, int arg=4*int(math.sqrt(4))): + print arg