def allindex(obj, value):
    """Return list of all indexes of value in obj."""
    ret = []
    index = 0
    while True:
        try:
            index = obj.index(value, index)
            ret.append(index)
            index += 1
        except ValueError:
            break

    return ret