Could anyone explain this line?
g = LocalProxy(lambda: _request_ctx_stack.top.g)
code from 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)
code of Local is here: http://pastebin.com/U3e1bEi0