elif sys.version_info < (2,5):
__doc__ = __doc__.replace(u"'int' object is unsubscriptable", u'unsubscriptable object')
+import cython
def index_tuple(tuple t, int i):
"""
assert D[ix] is True
del D[ix]
assert len(D) == 0
+
+@cython.boundscheck(False)
+def test_boundscheck(list L, tuple t, object o, unsigned long ix):
+ """
+ >>> test_boundscheck([1, 2, 4], (1, 2, 4), [1, 2, 4], 2)
+ (4, 4, 4)
+ >>> test_boundscheck([1, 2, 4], (1, 2, 4), "", 2)
+ Traceback (most recent call last):
+ ...
+ IndexError: string index out of range
+ """
+ return L[ix], t[ix], o[ix]