def replace(self, name, value=None):
        ql = self.queryList(False)
        ## Preserve the original position of the query key in the list
        i = 0
        for (k, v) in ql:
            if k == name:
                break
            i += 1
        q = filter(lambda x: x[0] != name, ql)
        q.insert(i, (name, value))
        return self._pathMod(self.pathList(copy=False), q)
Remove all existing occurrences of the query argument 'name', *if it
dataset/ETHPy150Open twisted/nevow/nevow/url.py/URL.replace