#NEWLINE# def curdir( self ) : #NEWLINE# #INDENT# "Construct a url which is a logical equivalent to '.'\n        of the current url. For example:\n\n        >>> print URL.fromString('http://foo.com/bar').curdir()\n        http://foo.com/\n        >>> print URL.fromString('http://foo.com/bar/').curdir()\n        http://foo.com/bar/\n        " #NEWLINE# l = self . pathList ( ) #NEWLINE# if ( l [ ( - 1 ) ] != '' ) : #NEWLINE# #INDENT# l [ ( - 1 ) ] = '' #NEWLINE# #UNINDENT# return self . _pathMod ( l , self . queryList ( 0 ) )