Cython has moved to github.

cython-devel

view tests/run/pinard8.pyx @ 1622:4f0327bdebc9

test for temp allocation bug in call
author Robert Bradshaw <robertwb@math.washington.edu>
date Sat Jan 17 01:25:34 2009 -0800 (3 years ago)
parents ff6249a604c2
children
line source
1 __doc__ = u"""
2 >>> f = Fiche()
3 >>> f[0] = 1
4 >>> f.geti()
5 1
7 >>> f[1] = None
8 >>> f.geti()
9 0
11 >>> f[0] = 1
12 >>> f.geti()
13 1
14 """
16 cdef class Fiche:
17 cdef int i
19 def __setitem__(self, element, valeur):
20 self.i = 0
21 if valeur is None:
22 return
23 self.i = 1
25 def geti(self):
26 return self.i