/usr/lib/python3/dist-packages/bitfield/compat.py is in python3-django-bitfield 1.8.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 27 | from __future__ import absolute_import
__all__ = ('bitand', 'bitor')
def bitand(a, b):
return a.bitand(b)
def bitor(a, b):
return a.bitor(b)
try:
from django.db.models.expressions import ExpressionNode
ExpressionNode.BITAND # noqa
del ExpressionNode
except ImportError:
# Django >= 1.8
pass
except AttributeError:
# Django < 1.5
def bitand(a, b): # NOQA
return a & b
def bitor(a, b): # NOQA
return a | b
|