python三元表达式

2018-10-30  本文已影响0人  戒灵

try_times_dw = response.meta['try_times_dw']if 'try_times_dw' in response.meta else 0

表示如果存在 'try_times_dw' 就是当前值 如果没有过去到它 就是0

更多详情:[https://www.cnblogs.com/lucaq/p/7051237.html]

上一篇下一篇

猜你喜欢

热点阅读