Fix use of 'is' operator for comparison

The 'is' operator is not meant to be used for comparisons. It currently working is an implementation detail of CPython.
CPython 3.8 has added a SyntaxWarning for this.

Bug: chromium:958874
Change-Id: Iea43a1e48a8b6f1abd4ed1652f724f455c3d0f59
Commit-Queue: Petr Hosek <>
Reviewed-by: Petr Hosek <>
diff --git a/tools/gn/misc/vim/ b/tools/gn/misc/vim/
index 561c76c..7e5d6a4 100644
--- a/tools/gn/misc/vim/
+++ b/tools/gn/misc/vim/
@@ -53,7 +53,7 @@
       lines = lines[:-1]
     sequence = difflib.SequenceMatcher(None, vim.current.buffer, lines)
     for op in reversed(sequence.get_opcodes()):
-      if op[0] is not 'equal':
+      if op[0] != 'equal':
         vim.current.buffer[op[1]:op[2]] = lines[op[3]:op[4]]