(self, path)
return [unquote(segment) for segment in segments]
Returns: The list of path segments from the path string <path>.

        Raises: UserWarning if <path> is an improperly encoded path
        string and self.strict is True.

        TODO(grun): Accept both list values and string values and
        refactor the list vs string interface testing to this common
        method.
Returns: The list of path segments from the path string <path>.
Returns : The list of path segments from the path string <path > .
def _segments_from_path(self, path):
        """
        Returns: The list of path segments from the path string <path>.

        Raises: UserWarning if <path> is an improperly encoded path
        string and self.strict is True.

        TODO(grun): Accept both list values and string values and
        refactor the list vs string interface testing to this common
        method.
        """
        segments = []
        for segment in path.split('/'):
            if not is_valid_encoded_path_segment(segment):
                segment = quote(utf8(segment))
                if self.strict:
                    s = ("Improperly encoded path string received: '%s'. "
                         "Proceeding, but did you mean '%s'?" %
                         (path, self._path_from_segments(segments)))
                    warnings.warn(s, UserWarning)
            segments.append(utf8(segment))
        del segment

        # In Python 3, utf8() returns Bytes objects that must be decoded into
        # strings before they can be passed to unquote(). In Python 2, utf8()
        # returns strings that can be passed directly to urllib.unquote().
        segments = [
            segment.decode('utf8')
            if isinstance(segment, bytes) and not isinstance(segment, str)
            else segment for segment in segments]

        return [unquote(segment) for segment in segments]
def _segments_from_path ( self , path ) : segments = [ ] for segment in path . split ( '/' ) : if not is_valid_encoded_path_segment ( segment ) : segment = quote ( utf8 ( segment ) ) if self . strict : s = ( "Improperly encoded path string received: '%s'. " "Proceeding, but did you mean '%s'?" % ( path , self . _path_from_segments ( segments ) ) ) warnings . warn ( s , UserWarning ) segments . append ( utf8 ( segment ) ) del segment # In Python 3, utf8() returns Bytes objects that must be decoded into # strings before they can be passed to unquote(). In Python 2, utf8() # returns strings that can be passed directly to urllib.unquote(). segments = [ segment . decode ( 'utf8' ) if isinstance ( segment , bytes ) and not isinstance ( segment , str ) else segment for segment in segments ] return [ unquote ( segment ) for segment in segments ]