Just thought about a "deselect" function, so as to remove a certain selection from the current one.
Eg Take the "frame" selection and remove the "corners", so as to keep only the pure sides.
Not a big deal. A button and 3 lines of code.
In a realistic use case I could for instance do "select all valves", then unselect all parts that are "pneumatically driven".
Thinking about it furthermore, it would be nice to have some sort of logic formula : (SelA AND selB) OR NOT(selB). But I wouldn't know adhoc how to implement it. (Maybe store the results, before applying?)