Why not just grow a parse method on str that returns a dict and do it this way?
q = "{a} {b}"p = "1 2"(a, b) = q.parse(p)