/usr/lib/python2.7/dist-packages/rpy2/rlike/indexing.py is in python-rpy2 2.8.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | def default_key(x):
""" Default comparison function """
return x
def order(seq, key = default_key, reverse = False):
""" Return the order in which to take the items to obtained
a sorted sequence."""
o = list(range(len(seq)))
def wrap_key(x):
x = seq[x]
return key(x)
o.sort(key = wrap_key, reverse = reverse)
return o
|