在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/Python/ python這個三目運(yùn)算符使用問題在哪?

python這個三目運(yùn)算符使用問題在哪?

    return generic_render(request, "monitor/generic/generic_list_page.html",
                          cPanel.get_cat_desc(key),
                          {'panel_list': 'process' == item ? 
                                cPanel.get_panel_list(key, '') : cPanel.get_panel_list(key)})
回答
編輯回答
胭脂淚

python沒有這種語法的,按下面這樣寫:

cPanel.get_panel_list(key, '') if 'process' == item else cPanel.get_panel_list(key)
2018年9月21日 03:22