blob: 8a56e10c0a7e276f552a189b0299f155486ef760 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
__doc__ = u"""
>>> print(idx_uint( ["buckle", "my", "shoe"], 2))
shoe
>>> print(idx_ulong(["buckle", "my", "shoe"], 2))
shoe
"""
def idx_ulong(seq, i):
cdef unsigned long u
u = i
return seq[u]
def idx_uint(seq, i):
cdef unsigned int u
u = i
return seq[u]
|