[Lldb-commits] [PATCH] D61548: Fix use of 'is' operator for comparison
Raul Tambre via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat May 4 01:59:17 PDT 2019
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61548.198131.patch
Type: text/x-patch
Size: 707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190504/308f8325/attachment.bin>
More information about the lldb-commits
mailing list