Put back trailing whitespace in doctest output.
[cython.git] / tests / run / r_huss3.pyx
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 """
12
13 import sys
14 if sys.version_info[0] >= 3:
15     __doc__ = __doc__.replace(u"Exception, e", u"Exception as e")
16
17 def bar():
18     try:
19         raise TypeError
20     except TypeError:
21         pass
22
23 def foo():
24     try:
25         raise ValueError
26     except ValueError, e:
27         bar()
28         raise