我想做这样的事情,在python中是否可能。
f = 'free'
p = 'paid'
if version is f:
APP_VER = 'APP_FREE'
elif version is p:
APP_VER = 'APP_PAID'
s_email = webapp2.get_app().config[APP_VER]['SUPPORT_EMAIL']
Error: UnboundLocalError: local variable 'APP_VER' referenced before assignment
任何想法!