================
@@ -15,7 +15,7 @@ class
TestDAP_stopped_events(lldbdap_testcase.DAPTestCaseBase):
ANY_THREAD = {}
def matches(self, a: dict, b: dict) -> bool:
- """Returns true if 'a' is a subset of 'b', otherwise false."""
+ """Returns true if 'b' is a subset of 'a', otherwise false."""
return a | b == a
----------------
JDevlieghere wrote:
I think this method as currently written is too cryptic:
1. The name of the function is wrong or at least needlessly confusing.
2. The name of the variables makes things worse.
Assuming the code is correct (and not the comment), I would prefer:
```
def is_subdict(self, small: dict, big: dict) -> bool:
"""Returns true if 'small' is a subset of 'big', otherwise false."""
return big | small == big
```
And updating the relevant call sites.
https://github.com/llvm/llvm-project/pull/179873
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits