"""
Python 2 / 3 compatibility helpers.
"""
import sys

py_ver = sys.version_info
PY2 = False
PY3 = False
if py_ver[0] == 2:
    PY2 = True
else:  # just in case PY4
    PY3 = True


if PY2:
    range = xrange
else:
    range = range

"""
Python 2 / 3 compatibility helpers.
"""
import sys

py_ver = sys.version_info
PY2 = False
PY3 = False
if py_ver[0] == 2:
    PY2 = True
else:  # just in case PY4
    PY3 = True


if PY2:
    range = xrange  # pylint: disable=undefined-variable
else:
    range = range

Disable pylint warning for xrange.
Disable pylint warning for xrange.

Pylint complains that xrange is an undefined variable when its run under
Python 3. This is true, which is why the offending line is wrapped with
an 'if PY3' clause.
