def charseq_get_value(a, i):
    """Access i-th item of CharSeq object via code value.

    null code is interpreted as IndexError
    """
    code = charseq_get_code(a, i)
    if code == 0:
        raise IndexError('index out of range')
    return code
Access i-th item of CharSeq object via code value.

    null code is interpreted as IndexError
    
numba/cpython/charseq.py