How about `return unify_seq(map(u.__dict__.get, attrs), map(v.__dict__.get, attrs), s)`