首页 > 其他 > 详细

This inspection highlights chained comparisons that can be simplified.

时间:2017-09-16 12:48:07      阅读:1560      评论:0      收藏:0      [点我收藏+]

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.

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!