python三元表达式


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]

你可能感兴趣的:(python三元表达式)