def _local_property():
    ls = threading.local()

    def fget(_):
        try:
            return ls.var
        except __HOLE__:
            raise RuntimeError("Request context not initialized.")

    def fset(_, value):
        ls.var = value

    def fdel(_):
        del ls.var

    return property(fget, fset, fdel, 'Thread-local property')
dataset/ETHPy150Open Arelle/Arelle/arelle/webserver/bottle.py/_local_property