It's not a lot of magic, but it's pretty opaque magic. The q object overloads the division operator and returns a ? and stores the "passed" value inside itself. The q object extends either a list or a dictionary to act as the set of values to pass to the parametrized query.
So in effect, the slash behavior is just a spicy way to append or set (depending on which dialect option you choose).