

def replace_at(word, line, index):
    ' Replace the text in-line.\n\n    The text in line is replaced (not inserted) with the word. The\n    replacement starts at the provided index. The result is cliped to\n    the input length\n\n    Arguments\n    ---------\n    word : str\n        The text to copy into the line.\n\n    line : str\n        The line where the copy takes place.\n\n    index : int\n        The index to start coping.\n\n    Returns\n    -------\n    result : str\n        line of text with the text replaced.\n\n    '
    word_length = len(word)
    result = ((line[:index] + word) + line[(result + word_length):])
    return result[:len(line)]

dataset/ETHPy150Open ContinuumIO/ashiba/enaml/docs/source/sphinxext/refactordoc/line_functions.py replace_at/VarMisuse@39/241 `index`->`result`