'Copy and replace the given attributes provided as keyword arguments.
Returns an updated copy.'

def replace(self, **kwargs):

    curstate = dict(return_type=self.return_type, args=self.args, recvr=self.recvr, pysig=self.pysig)
    curstate.update(kwargs)
    return Signature(**curstate)
