sidpy/base/string_utils.py
def validate_list_of_strings(str_list, parm_name='parameter'):
    """
    This function is to be used when validating and cleaning a list of strings.
    Trims the provided strings. Errors in the strings will result in Exceptions

    Parameters
    ----------
    str_list : array-like
        list or tuple of strings
    parm_name : str, Optional. Default = 'parameter'
        Name of the parameter corresponding to this string list that will be
        reported in the raised Errors

    Returns
    -------
    array-like
        List of trimmed and validated strings when ALL objects within the list
        are found to be valid strings
    """

    if isinstance(str_list, (str, unicode)):
        return [validate_single_string_arg(str_list, parm_name)]

    if not isinstance(str_list, (list, tuple)):
        raise TypeError(parm_name + ' should be a string or list / tuple of '
                                    'strings')

    return [validate_single_string_arg(x, parm_name) for x in str_list]

    This function is to be used when validating and cleaning a list of strings.
    Trims the provided strings. Errors in the strings will result in Exceptions

    Parameters
    ----------
    str_list : array-like
        list or tuple of strings
    parm_name : str, Optional. Default = 'parameter'
        Name of the parameter corresponding to this string list that will be
        reported in the raised Errors

    Returns
    -------
    array-like
        List of trimmed and validated strings when ALL objects within the list
        are found to be valid strings
    
This function is to be used when validating and cleaning a list of strings.
Trims the provided strings. Errors in the strings will result in Exceptions

Parameters

str_list : array-like
list or tuple of strings
parm_name : str, Optional. Default = 'parameter'
Name of the parameter corresponding to this string list that will be
reported in the raised Errors

Returns

array-like
List of trimmed and validated strings when ALL objects within the list
are found to be valid strings
This function is to be used when validating and cleaning a list of strings . Trims the provided strings . Errors in the strings will result in Exceptions Parameters str_list : array - like list or tuple of strings parm_name : str Optional . Default = ' parameter ' Name of the parameter corresponding to this string list that will be reported in the raised Errors Returns array - like List of trimmed and validated strings when ALL objects within the list are found to be valid strings
def validate_list_of_strings(str_list, parm_name='parameter'):
    if isinstance(str_list, (str, unicode)):
        return [validate_single_string_arg(str_list, parm_name)]
    if not isinstance(str_list, (list, tuple)):
        raise TypeError(parm_name + ' should be a string or list / tuple of '
                                    'strings')
    return [validate_single_string_arg(x, parm_name) for x in str_list]
def validate_list_of_strings ( str_list , parm_name = 'parameter' ) : if isinstance ( str_list , ( str , unicode ) ) : return [ validate_single_string_arg ( str_list , parm_name ) ] if not isinstance ( str_list , ( list , tuple ) ) : raise TypeError ( parm_name + ' should be a string or list / tuple of ' 'strings' ) return [ validate_single_string_arg ( x , parm_name ) for x in str_list ]
This function is to be used when validating and cleaning a list of strings.
This function is to be used when validating and cleaning a list of strings .
"""
    This function is to be used when validating and cleaning a list of strings.
    Trims the provided strings. Errors in the strings will result in Exceptions

    Parameters
    ----------
    str_list : array-like
        list or tuple of strings
    parm_name : str, Optional. Default = 'parameter'
        Name of the parameter corresponding to this string list that will be
        reported in the raised Errors

    Returns
    -------
    array-like
        List of trimmed and validated strings when ALL objects within the list
        are found to be valid strings
    """
str_list
parm_name