There seems to be an idiom whereby multiple parts generates Key->Value forms whereas for single part specifications, only a Value is returned. This however, can lead to inconsistencies as follows:
assoc = <|"a" -> 7, b -> 8, "c" -> 9|>;
{Query[{1, 2}][assoc], Query[1][assoc], Query[2][assoc]}
(* -> {<|"a" -> 7, b -> 8|>, 7, 8} *)
but doesn't this contradict the documentation on multiple queries?
Query::Docs] {op_1, op_2, ...} apply multiple operators at once to the result, yielding a list
firstly, a list is not "yielded" (returned) and secondly, each application of the operator ordinarily returns a value. A more consistent usage would therefore appear to be?
Query[{1, 2}][assoc]
(* -> {7, 8} *)
(* not valid existing input/output - suggestive only *)
In addition, the mere presence of a range (e.g. 1 ;; 2
) seems to induce individually specified parts to now return Values?
Query[{1, 2, 1 ;; 2}][assoc]
(*-> {7, 8, <|"a" -> 7, b -> 8|>} *)