'Helper method to patch attrs on pylons.g.
Since we do this all the time.  autpatch g with the provided kw.'

def patch_g(self, **kw):

    for (k, v) in kw.iteritems():
        self.autopatch(g, k, v, create=(not hasattr(g, k)))
