param : PARAMETER param_substitution_list COMMA
979044
def p_param(self, p):
        ''
        paramlist = [Parameter(rname, rvalue, lineno=p.lineno(2))
                     for rname, rvalue in p[2]]
        p[0] = Decl(tuple(paramlist), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
311196
def parse_params(self, params):
        
        for (key, value) in params.items():
            if not isinstance(value, str):
                string_params = self.to_string(value)
                params[key] = string_params
        return params
934882
def parametrize(params):
    
    returned = str(params[0])
    returned += "".join("[" + str(p) + "]" for p in params[1:])
    return returned
694407
def _return_comma_list(self, l):
        
        if isinstance(l, (text_type, int)):
            return l

        if not isinstance(l, list):
            raise TypeError(l, ' should be a list of integers, \
not {0}'.format(type(l)))

        str_ids = ','.join(str(i) for i in l)

        return str_ids
958984
def _build_param_string(params):
        
        pairs = []
        for key, value in params.iteritems():
            if value is None:
                value = ''
            pairs.append('{0}={1}'.format(key, value))
        if len(pairs) > 0:
            return '?{0}'.format('&'.join(pairs))
        return ''
1001658
def get_params_from_list(params_list):
    
    params = {}
    for i in range(0, len(params_list)):
        if '=' not in params_list[i]:
            try:
                if not isinstance(params[key], list): params[key] = [params[key]]
                params[key] += [params_list[i]]
            except KeyError:
                raise ValueError('Pass parameters like `key1=a key2=b c d key3=...`.')
        else:
            key_val = params_list[i].split('=')
            key, val = key_val
            params[key] = convert_string(val)
    return params
760801
def format_auth_params(params):
        
        parts = []
        for (key, value) in params.items():
            if value:
                parts.append('{}="{}"'.format(key, value))
        return ", ".join(parts)
421376
def comma_list(cls, string):
        ''''''
        items = string.split(',')
        items = list([item.strip() for item in items])
        return items
1332471
def p_ParamList(p):
    '''
    
    '''
    if len(p) == 1:
        p[0] = ParamList(None, None)
    elif len(p) == 2:
        p[0] = ParamList(None, p[1])
    else:
        p[0] = ParamList(p[1], p[3])
251052
def _format_param_value(key, value):
    
    if isinstance(value, str):
        value = "'{}'".format(value)
    return "{}={}".format(key, value)
322201
def format_parameters(params):
    ''''''

    if not params:
        return {}

    # expect multiple invocations of --parameters but fall back
    # to ; delimited if only one --parameters is specified
    if len(params) == 1:
        if params[0].find(';') != -1:  # found
            params = params[0].split(';')
        else:
            params = params[0].split(',')

    parameters = {}
    for p in params:
        try:
            (n, v) = p.split('=', 1)
        except ValueError:
            msg = '%s(%s). %s.' % ('Malformed parameter', p,
                                   'Use the key=value format')
            raise exc.CommandError(msg)

        if n not in parameters:
            parameters[n] = v
        else:
            if not isinstance(parameters[n], list):
                parameters[n] = [parameters[n]]
            parameters[n].append(v)

    return parameters
817356
def param_set(param):
        
        instance = param.effect.instance

        return 'param_set {} {} {}'.format(instance, param.symbol, param.value)
386007
def _format_params(self, type_, params):
        """"""
        if 'initial_state' in params:
            # NB: at this moment the error raised when initial_state does not match lin/quad (in
            # active qubits) is not very informative, but there is also no clean way to check here
            # that they match because lin can be either a list or a dict. In the future it would be
            # good to check.
            initial_state = params['initial_state']
            if isinstance(initial_state, Mapping):

                initial_state_list = [3]*self.properties['num_qubits']

                low = -1 if type_ == 'ising' else 0

                for v, val in initial_state.items():
                    if val == 3:
                        continue
                    if val <= 0:
                        initial_state_list[v] = low
                    else:
                        initial_state_list[v] = 1

                params['initial_state'] = initial_state_list
102531
private void writeLegacyFormatting(List<Object> list, Object paramExtractor) {
        if (paramExtractor != null) {
            list.add("{\"params\":");
            list.add(paramExtractor);
            list.add(",");
        }
        else {
            list.add("{");
        }

        if (HAS_SCRIPT) {
            /*
             * {
             *   "params": ...,
             *   "lang": "...",
             *   "script": "...",
             *   "upsert": {...}
             * }
             */
            if (HAS_LANG) {
                list.add(SCRIPT_LANG_1X);
            }
            list.add(SCRIPT_1X);
            if (UPSERT) {
                list.add(",\"upsert\":");
            }
        }
        else {
            /*
             * {
             *   "doc_as_upsert": true,
             *   "doc": {...}
             * }
             */
            if (UPSERT) {
                list.add("\"doc_as_upsert\":true,");
            }
            list.add("\"doc\":");
        }
    }
521819
def format_parameters(self, params):
        # type: (Dict[str, str]) -> None
        
        query = urlparse(self.url).query
        if query:
            self.url = self.url.partition('?')[0]
            existing_params = {
                p[0]: p[-1]
                for p in [p.partition('=') for p in query.split('&')]
            }
            params.update(existing_params)
        query_params = ["{}={}".format(k, v) for k, v in params.items()]
        query = '?' + '&'.join(query_params)
        self.url = self.url + query
209829
def _encode_params(kw):
    '''
    
    '''
    args = []
    for k, v in kw.items():
        try:
            # Python 2
            qv = v.encode('utf-8') if isinstance(v, unicode) else str(v)
        except:
            qv = v
        args.append('%s=%s' % (k, urlquote(qv)))
    return '&'.join(args)
981311
def member_params(params)
      ps = Array(params).map do |p|
        p[:optional] ? "[#{p[:name]}]" : p[:name]
      end.join(", ")

      "( <span class='pre'>#{ps}</span> )"
    end