import six


def _bytes(*args):
    """
    Returns a byte array (bytes in py3, str in py2) of chr(b) for
    each b in args
    """
    if six.PY2:
        return "".join(chr(c) for c in args)
    # else: Python 3
    return bytes(args)