Cython has moved to github.
cython-devel
view tests/run/r_addint.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 | 51af944198ca |
| children | 78fd9923f684 |
line source
1 __doc__ = u"""
2 >>> def test(a, b):
3 ... return (a, b, add(a, b))
5 >>> test(1, 2)
6 (1, 2, 3)
7 >>> [ str(f) for f in test(17.3, 88.6) ]
8 ['17.3', '88.6', '105.9']
9 >>> test(u'eggs', u'spam')
10 (u'eggs', u'spam', u'eggsspam')
11 """
13 import sys
14 if sys.version_info[0] >= 3:
15 __doc__ = __doc__.replace(u"u'", u"'")
17 def add(x, y):
18 return x + y
