Cython has moved to github.
cython-devel
view tests/run/iteratorexception.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 | |
| children | 0310198e281e |
line source
1 __doc__ = """
2 >>> f()
3 """
5 class IteratorAndIterateable:
6 def next(self):
7 raise ValueError("")
8 def __iter__(self):
9 return self
11 def f():
12 try:
13 for x in IteratorAndIterateable():
14 pass
15 assert False, "Should not reach this point, iterator has thrown exception"
16 except ValueError:
17 pass
