projects
/
cython.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Remove trailing whitespace.
[cython.git]
/
tests
/
run
/
r_uintindex.pyx
1
__doc__ = u"""
2
>>> print(idx_uint( ["buckle", "my", "shoe"], 2))
3
shoe
4
>>> print(idx_ulong(["buckle", "my", "shoe"], 2))
5
shoe
6
"""
7
8
def idx_ulong(seq, i):
9
cdef unsigned long u
10
u = i
11
return seq[u]
12
13
def idx_uint(seq, i):
14
cdef unsigned int u
15
u = i
16
return seq[u]