有人可以解释这行代码吗?
g = LocalProxy(lambda: _request_ctx_stack.top.g)
来自Flask的代码
from werkzeug import LocalStack, LocalProxy
# context locals
_request_ctx_stack = LocalStack()
current_app = LocalProxy(lambda: _request_ctx_stack.top.app)
request = LocalProxy(lambda: _request_ctx_stack.top.request)
session = LocalProxy(lambda: _request_ctx_stack.top.session)
g = LocalProxy(lambda: _request_ctx_stack.top.g)
本地代码在这里:http://pastebin.com/U3e1bEi0