Cython has moved to github.

cython-devel

view tests/run/builtinnames.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 b5ef323d76d2
children 82d312a9f1fc
line source
1 __doc__ = u"""
2 >>> test_c('abc')
3 fileabc
4 typeabc
5 >>> print(test_file_py('abc'))
6 abc
7 >>> print(range('abc'))
8 rangeabc
9 """
12 def test_file_py(file):
13 assert isinstance(file, (str, unicode)), \
14 u"not a string, found '%s' instead" % file.__class__.__name__
15 return file
17 cdef test_file_c(file):
18 assert isinstance(file, (str, unicode)), \
19 u"not a string, found '%s' instead" % file.__class__.__name__
20 return u'file' + file
23 def range(arg):
24 return u'range' + arg
26 cdef type(arg):
27 return u'type' + arg
30 def test_c(arg):
31 print test_file_c(arg)
32 print type(arg)