def parentdir(self):
        l = self.pathList()
        if not self.isRoot(l) and l[-1] == '':
            del l[-2]
        else:
            # we are a file, such as http://example.com/foo/bar our
            # parent directory is http://example.com/
            l.pop()
            if self.isRoot(l): l.append('')
            else: l[-1] = ''
        return self._pathMod(l, self.queryList(0))
Construct a url which is the parent of this url's directory;
dataset/ETHPy150Open twisted/nevow/nevow/url.py/URL.parentdir