def get_change_extent(str1, str2):
    start = 0
    limit = min(len(str1), len(str2))
    while start < limit and str1[start] == str2[start]:
        start += 1
    end = -1
    limit = limit - start
    while -end <= limit and str1[end] == str2[end]:
        end -= 1
    return (start, end + 1)
Return the current policy function for memcache timeout (expiration).
dataset/ETHPy150Open edgewall/trac/trac/versioncontrol/diff.py/get_change_extent--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/context.py/Context.get_memcache_timeout_policy