tambre created this revision.
tambre added a reviewer: zturner.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

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.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D61548

Files:
  lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py


Index: lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
+++ lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
@@ -79,9 +79,9 @@
                 "target variable returns wrong variable " + name)
 
         for name in global_variables_assert:
-            if name is "C::a" and not test_c:
+            if name == "C::a" and not test_c:
                 continue
-            if name is not "C::a" and test_c:
+            if name != "C::a" and test_c:
                 continue
 
             value = frame.EvaluateExpression(name)


Index: lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
+++ lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
@@ -79,9 +79,9 @@
                 "target variable returns wrong variable " + name)
 
         for name in global_variables_assert:
-            if name is "C::a" and not test_c:
+            if name == "C::a" and not test_c:
                 continue
-            if name is not "C::a" and test_c:
+            if name != "C::a" and test_c:
                 continue
 
             value = frame.EvaluateExpression(name)
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to