/usr/lib/python2.7/dist-packages/natsort/compat/fastnumbers.py is in python-natsort 4.0.3-2.
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 27 28 | # -*- coding: utf-8 -*-
from __future__ import (
print_function,
division,
unicode_literals,
absolute_import
)
# If the user has fastnumbers installed, they will get great speed
# benefits. If not, we use the simulated functions that come with natsort.
try:
from fastnumbers import (
fast_float,
fast_int,
isint,
isfloat,
)
import fastnumbers
v = list(map(int, fastnumbers.__version__.split('.')))
if not (v[0] >= 0 and v[1] >= 5): # Require >= version 0.5.0.
raise ImportError
except ImportError:
from natsort.compat.fake_fastnumbers import (
fast_float,
fast_int,
isint,
isfloat,
)
|