Cython has moved to github.
cython-devel
view tests/run/r_huss3.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 | 739b62170404 |
| children | 1dadfbd04642 |
line source
1 __doc__ = u"""
2 >>> try:
3 ... foo()
4 ... except Exception, e:
5 ... print("%s: %s" % (e.__class__.__name__, e))
6 ValueError:
7 >>> try:
8 ... bar()
9 ... except Exception, e:
10 ... print("%s: %s" % (e.__class__.__name__, e))
11 """
13 import sys
14 if sys.version_info[0] >= 3:
15 __doc__ = __doc__.replace(u"Exception, e", u"Exception as e")
17 def bar():
18 try:
19 raise TypeError
20 except TypeError:
21 pass
23 def foo():
24 try:
25 raise ValueError
26 except ValueError, e:
27 bar()
28 raise
