Cython has moved to github.

cython-devel

view tests/run/funcexceptreturn.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 e49a8a306605
line source
1 __doc__ = u"""
2 >>> import sys
3 >>> if not IS_PY3: sys.exc_clear()
5 >>> print(sys.exc_info()[0]) # 0
6 None
7 >>> exc = test_c()
8 >>> type(exc) is TestException
9 True
10 >>> print(sys.exc_info()[0]) # test_c()
11 None
12 """
14 import sys
16 IS_PY3 = sys.version_info[0] >= 3
18 class TestException(Exception):
19 pass
21 def test_c():
22 try:
23 raise TestException
24 except TestException, e:
25 return e