(cls, params)
Prepares the parameters for a Generic containing ParamSpec
    variables (internal helper).
Prepares the parameters for a Generic containing ParamSpec
    variables (internal helper).
Prepares the parameters for a Generic containing ParamSpec variables ( internal helper ) .
def _prepare_paramspec_params(cls, params):
    """Prepares the parameters for a Generic containing ParamSpec
    variables (internal helper).
    """
    # Special case where Z[[int, str, bool]] == Z[int, str, bool] in PEP 612.
    if (len(cls.__parameters__) == 1
            and params and not _is_param_expr(params[0])):
        assert isinstance(cls.__parameters__[0], ParamSpec)
        return (params,)
    else:
        _check_generic(cls, params, len(cls.__parameters__))
        _params = []
        # Convert lists to tuples to help other libraries cache the results.
        for p, tvar in zip(params, cls.__parameters__):
            if isinstance(tvar, ParamSpec) and isinstance(p, list):
                p = tuple(p)
            _params.append(p)
        return tuple(_params)
def _prepare_paramspec_params ( cls , params ) : # Special case where Z[[int, str, bool]] == Z[int, str, bool] in PEP 612. if ( len ( cls . __parameters__ ) == 1 and params and not _is_param_expr ( params [ 0 ] ) ) : assert isinstance ( cls . __parameters__ [ 0 ] , ParamSpec ) return ( params , ) else : _check_generic ( cls , params , len ( cls . __parameters__ ) ) _params = [ ] # Convert lists to tuples to help other libraries cache the results. for p , tvar in zip ( params , cls . __parameters__ ) : if isinstance ( tvar , ParamSpec ) and isinstance ( p , list ) : p = tuple ( p ) _params . append ( p ) return tuple ( _params )