def eval_number(number):
    """
	Evaluate a numerical expressions in different string formats indicating
	base.

	:param str number: The string to evaluate.
	:return: The converted value.
	:rtype: int
	"""
    if number.startswith('0b'):
        return int(number[2:], 2)
    elif number.startswith('0x'):
        return int(number[2:], 16)
    elif number.startswith('0'):
        return int(number, 8)
    elif number.isdigit():
        return int(number)
    else:
        raise ValueError("unknown numerical value: '" + number + "'")
