micro-optimize iteration of evaluated set
It is generally accepted practice to convert dict.keys() to a list
before iterating over it and e.g. deleting values, as keys returns a
live-action view. In this case, we use the difference of *two* dict
keys, which returns a regular non-view set and doesn't need protecting.
Iteration order doesn't matter (the set already randomizes it anyway).
Avoid the cost of converting to a list.
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index eeeb8d1..f6eb659 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -923,7 +923,7 @@
fatal=False)
# Find any extranious keys for this project and remove them
- for key in list(self.options.keys() - options.keys()):
+ for key in self.options.keys() - options.keys():
if key.is_project() and key.subproject == subproject:
del self.options[key]