码迷,mamicode.com
首页 > 其他好文 > 详细

This inspection highlights chained comparisons that can be simplified.

时间:2017-09-16 13:35:54      阅读:998      评论:0      收藏:0      [点我收藏+]

标签:href   over   html   ons   pyc   ack   text   iso   ssi   

https://stackoverflow.com/questions/26502775/pycharm-simplify-chained-comparison

 

In Python you can "chain" comparison operations which just means they are "and"ed together. In your case, it‘d be like this:

if start <= x <= end:

Reference: https://docs.python.org/2/reference/expressions.html#not-in

 

This inspection highlights chained comparisons that can be simplified.

标签:href   over   html   ons   pyc   ack   text   iso   ssi   

原文地址:http://www.cnblogs.com/antflow/p/7530605.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!