This file is indexed.

/usr/share/pyshared/doit/compat.py is in python-doit 0.24.0-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
17
18
19
20
21
22
23
24
25
26
"""stuff dealing with incompatibilities between python versions"""

import sys
import inspect

PY3 = (sys.version_info[0] >= 3)


# Use simplejson or Python 2.6 json
# simplejson is much faster that py26:json. so use simplejson if available
try:  # pragma: no cover
    import simplejson
    json = simplejson
except ImportError: # pragma: no cover
    import json
json # pyflakes


# compat for inspect.ismethod
if PY3: # pragma: no cover
    is_bound_method = inspect.ismethod
else:
    # In Python 2, ismethod() returns True for both bound & unbound methods.
    def is_bound_method(obj):
        return (inspect.ismethod(obj) and
                (getattr(obj, '__self__', None) is not None))