def char_from_number(number):
    """
    Converts number to string by rendering it in base 26 using
    capital letters as digits.

    """
    base = 26
    rval = ''
    if number == 0:
        rval = 'A'
    while number != 0:
        remainder = number % base
        new_char = chr(ord('A') + remainder)
        rval = new_char + rval
        number //= base
    return rval
