Cython has moved to github.
cython-devel
view tests/run/r_hordijk1.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 | 1bc4e4b30a9a |
| children |
line source
1 __doc__ = u"""
2 >>> try:
3 ... s = Spam()
4 ... except KeyError, e:
5 ... print("Exception: %s" % e)
6 ... else:
7 ... print("Did not raise the expected exception")
8 Exception: u'This is not a spanish inquisition'
9 """
11 import sys
12 if sys.version_info[0] >= 3:
13 __doc__ = __doc__.replace(u"Error, e", u"Error as e")
14 __doc__ = __doc__.replace(u" u'", u" '")
16 cdef extern from "Python.h":
17 ctypedef class __builtin__.list [object PyListObject]:
18 pass
20 cdef class Spam(list):
21 def __init__(self):
22 raise KeyError(u"This is not a spanish inquisition")
