parameters: (self, rhs)
return_statement: return drake.Path(path,
                          absolute=self.__absolute,
                          virtual=self.__virtual,
                          volume=self.__volume)
docstring: Remove rhs suffix from self.
  
        rhs -- the suffix to strip, as a Path or a string.
  
        >>> p = Path('foo/bar/baz/quux')
        >>> p
        Path("foo/bar/baz/quux")
        >>> p.without_suffix("baz/quux")
        Path("foo/bar")
  
        Throws if rhs is not a prefix of self.
  
        >>> p.without_suffix("baz")
        Traceback (most recent call last):
            ...
        Exception: baz is not a suffix of foo/bar/baz/quux
docstring_summary: Remove rhs suffix from self.
docstring_tokens: Remove rhs suffix from self .
function: def without_suffix(self, rhs):
        """Remove rhs suffix from self.
  
        rhs -- the suffix to strip, as a Path or a string.
  
        >>> p = Path('foo/bar/baz/quux')
        >>> p
        Path("foo/bar/baz/quux")
        >>> p.without_suffix("baz/quux")
        Path("foo/bar")
  
        Throws if rhs is not a prefix of self.
  
        >>> p.without_suffix("baz")
        Traceback (most recent call last):
            ...
        Exception: baz is not a suffix of foo/bar/baz/quux
        """
        rhs = drake.Path(rhs)
        if self.__path[-len(rhs.__path):] != rhs.__path:
          raise Exception("%s is not a suffix of %s" % (rhs, self))
        path = self.__path[0:-len(rhs.__path):]
        if not path:
          path = ('.',)
        return drake.Path(path,
                          absolute=self.__absolute,
                          virtual=self.__virtual,
                          volume=self.__volume)
function_tokens: def without_suffix ( self , rhs ) : rhs = drake . Path ( rhs ) if self . __path [ - len ( rhs . __path ) : ] != rhs . __path : raise Exception ( "%s is not a suffix of %s" % ( rhs , self ) ) path = self . __path [ 0 : - len ( rhs . __path ) : ] if not path : path = ( '.' , ) return drake . Path ( path , absolute = self . __absolute , virtual = self . __virtual , volume = self . __volume )