Cython has moved to github.
cython-devel
view tests/run/literals.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 | ff6249a604c2 |
| children | 7087e1042933 |
line source
1 __doc__ = u"""
2 >>> foo()
3 """
5 def foo():
6 a = 42
7 a1 = 0123
8 a2 = 0xabc
9 a3 = 0xDEF
10 a4 = 1234567890L
11 b = 42.88e17
12 b0a = 1.
13 b0b = .1
14 b0c = 1.1
15 b0d = 1.e1
16 b0e = .1e1
17 b0f = 1.1e1
18 b0g = 1.1e-1
19 b0h = 1e1
20 b1 = 3j
21 b2 = 3.1415J
22 b3 = c'X'
23 c = "spanish inquisition"
24 d = "this" "parrot" "is" "resting"
25 e = 'single quoted string'
26 f = '"this is quoted"'
27 g = '''Triple single quoted string.'''
28 h = """Triple double quoted string."""
29 g1 = '''Two line triple
30 single quoted string.'''
31 h1 = """Two line triple
32 double quoted string."""
33 i = 'This string\
34 has an ignored newline.'
35 j = 'One-char escapes: \'\"\\\a\b\f\n\r\t\v'
36 k = 'Oct and hex escapes: \1 \12 \123 \x45 \xaf \xAF'
37 l = r'''This is\
38 a \three \line
39 raw string with some backslashes.'''
40 m = 'Three backslashed ordinaries: \c\g\+'
41 n = '''Triple single quoted string
42 with ' and " quotes'''
43 o = """Triple double quoted string
44 with ' and " quotes"""
45 p = "name_like_string"
46 q = "NameLikeString2"
47 r = "99_percent_un_namelike"
48 s = "Not an \escape"
