mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 15:13:13 +07:00
GitOrigin-RevId: 56876a5dd073a06c3fcc92f63ed1f5674830bc25
23 lines
426 B
HTML
23 lines
426 B
HTML
<html>
|
|
<body>
|
|
<p>Reports comparisons with <code>None</code>. That type of comparisons
|
|
should always be done with <code>is</code> or <code>is not</code>, never
|
|
the equality operators.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
a = 2
|
|
|
|
|
|
if a == None:
|
|
print("Success")
|
|
</code></pre>
|
|
<p>Once the quick-fix is applied, the code changes to:</p>
|
|
<pre><code>
|
|
a = 2
|
|
|
|
|
|
if a is None:
|
|
print("Success")
|
|
</code></pre>
|
|
</body>
|
|
</html> |