Skip to content
Snippets Groups Projects
Commit 48ab42f0 authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

STYLE: src/Admin: Update python scripts to use "is None" instead of "== None"

Rational copied from https://www.python.org/dev/peps/pep-0290/#testing-for-none

// -----------------
Since there is only one None object, equality can be tested with identity. Identity
tests are slightly faster than equality tests. Also, some object types may overload
comparison, so equality testing may be much slower.

Pattern:

if v == None  -->  if v is None:
if v != None  -->  if v is not None:
// -----------------
parent 697b15ab
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment