(self, path)
return self
Add <path> to the existing path. <path> can either be a Path instance,
        a list of segments, or a path string to append to the existing path.

        Returns: <self>.
Add <path> to the existing path. <path> can either be a Path instance,
        a list of segments, or a path string to append to the existing path.
Add <path > to the existing path . <path > can either be a Path instance a list of segments or a path string to append to the existing path .
def add(self, path):
        """
        Add <path> to the existing path. <path> can either be a Path instance,
        a list of segments, or a path string to append to the existing path.

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

        # Preserve the opening '/' if one exists already (self.segments
        # == ['']).
        if self.segments == [''] and newsegments and newsegments[0] != '':
            newsegments.insert(0, '')

        segments = self.segments
        if self.isabsolute and self.segments and self.segments[0] != '':
            segments.insert(0, '')

        self.load(join_path_segments(segments, newsegments))

        return self
def add ( self , path ) : if quacks_like_a_path_with_segments ( path ) : # Path interface. newsegments = path . segments elif is_iterable_but_not_string ( path ) : # List interface. newsegments = path else : # String interface. newsegments = self . _segments_from_path ( path ) # Preserve the opening '/' if one exists already (self.segments # == ['']). if self . segments == [ '' ] and newsegments and newsegments [ 0 ] != '' : newsegments . insert ( 0 , '' ) segments = self . segments if self . isabsolute and self . segments and self . segments [ 0 ] != '' : segments . insert ( 0 , '' ) self . load ( join_path_segments ( segments , newsegments ) ) return self