sidpy/base/string_utils.py
def validate_string_args(arg_list, arg_names):
    """
    This function is to be used when validating string parameters for a
    function. Trims the provided strings.
    Errors in the strings will result in Exceptions

    Parameters
    ----------
    arg_list : array-like
        List of str objects that signify the value for a position argument in
        a function
    arg_names : array-like
        List of str objects with the names of the corresponding parameters in
        the function

    Returns
    -------
    array-like
        List of str objects that signify the value for a position argument in a
        function with spaces on ends removed
    """
    if isinstance(arg_list, (str, unicode)):
        arg_list = [arg_list]
    if isinstance(arg_names, (str, unicode)):
        arg_names = [arg_names]
    cleaned_args = []
    if not isinstance(arg_list, (tuple, list)):
        raise TypeError('arg_list should be a tuple or a list or a string')
    if not isinstance(arg_names, (tuple, list)):
        raise TypeError('arg_names should be a tuple or a list or a string')
    for arg, arg_name in zip(arg_list, arg_names):
        cleaned_args.append(validate_single_string_arg(arg, arg_name))
    return cleaned_args

    This function is to be used when validating string parameters for a
    function. Trims the provided strings.
    Errors in the strings will result in Exceptions

    Parameters
    ----------
    arg_list : array-like
        List of str objects that signify the value for a position argument in
        a function
    arg_names : array-like
        List of str objects with the names of the corresponding parameters in
        the function

    Returns
    -------
    array-like
        List of str objects that signify the value for a position argument in a
        function with spaces on ends removed
    
This function is to be used when validating string parameters for a
function. Trims the provided strings.
Errors in the strings will result in Exceptions

Parameters

arg_list : array-like
List of str objects that signify the value for a position argument in
a function
arg_names : array-like
List of str objects with the names of the corresponding parameters in
the function

Returns

array-like
List of str objects that signify the value for a position argument in a
function with spaces on ends removed
This function is to be used when validating string parameters for a function . Trims the provided strings . Errors in the strings will result in Exceptions Parameters arg_list : array - like List of str objects that signify the value for a position argument in a function arg_names : array - like List of str objects with the names of the corresponding parameters in the function Returns array - like List of str objects that signify the value for a position argument in a function with spaces on ends removed
def validate_string_args(arg_list, arg_names):
    if isinstance(arg_list, (str, unicode)):
        arg_list = [arg_list]
    if isinstance(arg_names, (str, unicode)):
        arg_names = [arg_names]
    cleaned_args = []
    if not isinstance(arg_list, (tuple, list)):
        raise TypeError('arg_list should be a tuple or a list or a string')
    if not isinstance(arg_names, (tuple, list)):
        raise TypeError('arg_names should be a tuple or a list or a string')
    for arg, arg_name in zip(arg_list, arg_names):
        cleaned_args.append(validate_single_string_arg(arg, arg_name))
    return cleaned_args
def validate_string_args ( arg_list , arg_names ) : if isinstance ( arg_list , ( str , unicode ) ) : arg_list = [ arg_list ] if isinstance ( arg_names , ( str , unicode ) ) : arg_names = [ arg_names ] cleaned_args = [ ] if not isinstance ( arg_list , ( tuple , list ) ) : raise TypeError ( 'arg_list should be a tuple or a list or a string' ) if not isinstance ( arg_names , ( tuple , list ) ) : raise TypeError ( 'arg_names should be a tuple or a list or a string' ) for arg , arg_name in zip ( arg_list , arg_names ) : cleaned_args . append ( validate_single_string_arg ( arg , arg_name ) ) return cleaned_args
This function is to be used when validating string parameters for a
function.
This function is to be used when validating string parameters for a function .
"""
    This function is to be used when validating string parameters for a
    function. Trims the provided strings.
    Errors in the strings will result in Exceptions

    Parameters
    ----------
    arg_list : array-like
        List of str objects that signify the value for a position argument in
        a function
    arg_names : array-like
        List of str objects with the names of the corresponding parameters in
        the function

    Returns
    -------
    array-like
        List of str objects that signify the value for a position argument in a
        function with spaces on ends removed
    """
arg_list
arg_names