Try to parse a string to a number, else return False.

def __try_parse_number(self, string):
        """Try to parse a string to a number, else return False."""
        try:
            return int(string)
        except ValueError:
            try:
                return float(string)
            except ValueError:
                return False