/usr/lib/python2.7/dist-packages/txzmq/compat.py is in python-txzmq 0.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 | import sys
PY3 = sys.version_info[0] == 3
if PY3: # pragma: no cover
binary_string_type = bytes
else: # pragma: no cover
binary_string_type = str
if PY3: # pragma: no cover
def is_nonstr_iter(v):
if isinstance(v, (str, bytes)):
return False
return hasattr(v, '__iter__')
else: # pragma: no cover
def is_nonstr_iter(v):
return hasattr(v, '__iter__')
|