[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.
@@ -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:
- if name is not "C::a" and test_c:
+ if name != "C::a" and test_c:
value = frame.EvaluateExpression(name)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 707 bytes
Desc: not available
More information about the lldb-commits