mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
22 lines
510 B
HTML
22 lines
510 B
HTML
<html>
|
|
<body>
|
|
<p>Reports chained comparisons that can be simplified.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
def do_comparison(x):
|
|
xmin = 10
|
|
xmax = 100
|
|
if x >= xmin and x <= xmax:
|
|
pass
|
|
</code></pre>
|
|
<p>The IDE offers to simplify <code>if x >= xmin and x <= xmax</code>.
|
|
When the quick-fix is applied, the code changes to:</p>
|
|
<pre><code>
|
|
def do_comparison(x):
|
|
xmin = 10
|
|
xmax = 100
|
|
if xmin <= x <= xmax:
|
|
pass
|
|
</code></pre>
|
|
</body>
|
|
</html> |