def _convert(self, s):
        """Convert a string to a numeric type (float or int).

        Return None if `s` is empty.
        Raise an InvalidQueryError if the string cannot be converted.
        """
        # This is really just a bit of fun premature optimization.
        if not s:
            return None
        try:
            return int(s)
        except __HOLE__:
            try:
                return float(s)
            except ValueError:
                raise InvalidQueryArgumentTypeError(s, u"an int or a float")
dataset/ETHPy150Open beetbox/beets/beets/dbcore/query.py/NumericQuery._convert