(self, path)
return self
Load <path>, replacing any existing path. <path> can either be
        a Path instance, a list of segments, a path string to adopt.

        Returns: <self>.
Load <path>, replacing any existing path. <path> can either be
        a Path instance, a list of segments, a path string to adopt.
Load <path > replacing any existing path . <path > can either be a Path instance a list of segments a path string to adopt .
def load(self, path):
        """
        Load <path>, replacing any existing path. <path> can either be
        a Path instance, a list of segments, a path string to adopt.

        Returns: <self>.
        """
        if not path:
            segments = []
        elif quacks_like_a_path_with_segments(path):  # Path interface.
            segments = path.segments
        elif is_iterable_but_not_string(path):  # List interface.
            segments = path
        else:  # String interface.
            segments = self._segments_from_path(path)

        if self._force_absolute(self):
            self._isabsolute = True if segments else False
        else:
            self._isabsolute = (segments and segments[0] == '')

        if self.isabsolute and len(segments) > 1 and segments[0] == '':
            segments.pop(0)

        self.segments = segments

        return self
def load ( self , path ) : if not path : segments = [ ] elif quacks_like_a_path_with_segments ( path ) : # Path interface. segments = path . segments elif is_iterable_but_not_string ( path ) : # List interface. segments = path else : # String interface. segments = self . _segments_from_path ( path ) if self . _force_absolute ( self ) : self . _isabsolute = True if segments else False else : self . _isabsolute = ( segments and segments [ 0 ] == '' ) if self . isabsolute and len ( segments ) > 1 and segments [ 0 ] == '' : segments . pop ( 0 ) self . segments = segments return self