def pathexpr(expr):
    if not isinstance(expr, unicode):
        expr = unicode(expr)
    try:
        return expression_cache[expr]
    except __HOLE__:
        compiled = PathExpression(expr)
        if len(expression_cache) < max_cache_size:
            return expression_cache.setdefault(expr, compiled)
        else:
            return compile
dataset/ETHPy150Open jek/flatland/flatland/schema/paths.py/pathexpr