def peek(state, pos=0):
    """Peeks the character at pos from the head of data."""

    if state.head + pos >= len(state.data):
        return None

    return state.data[state.head + pos]
dataset/ETHPy150Open google/pywebsocket/mod_pywebsocket/http_header_util.py/peek/original