'Make comparison methods which encode the ``other`` object to utf-8
in the case of a bytestring dtype for Py3+.'

def _make_compare(oper):

    def _compare(self, other):
        if ((not six.PY2) and (self.dtype.char == u'S')):
            other = self._encode_str(other)
        return getattr(self.data, oper)(other)
    return _compare
