/usr/lib/python2.7/dist-packages/rdflib/compat.py is in python-rdflib 4.1.2-3.
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 | #
# code to simplify supporting older python versions
#
import sys
from decimal import Decimal
if sys.version_info[:2] < (2, 7):
# Pre-2.7 decimal and float did not compare correctly
def numeric_greater(a, b):
if isinstance(a, Decimal) and isinstance(b, float):
return float(a) > b
elif isinstance(a, float) and isinstance(b, Decimal):
return a > float(b)
else:
return a > b
else:
def numeric_greater(a, b):
return a > b
|