Lines Matching defs:value
218 value = kwargs[name]
219 if not value:
222 value = textwrap.indent(rstrip_lines(value), indent)
223 add(value)
343 # should receive the value returned by the impl.
347 # value from the parse function. This is also where
1203 # and wrap each non-empty value in \n's
1205 for name, value in d.items():
1206 assert value is not None, "got a None value for template " + repr(name)
1207 if value:
1208 value = '\n' + value + '\n'
1209 d2[name] = value
1694 name, equals, value = field.partition('=')
1697 d[name.strip()] = value.strip()
1997 name, value, *options = line.split()
1999 self.presets[value] = preset = collections.OrderedDict()
2006 buffer = self.get_destination_buffer(value, index)
2376 for name, value in f.parameters.items():
2377 value = value.copy(function=f)
2378 parameters[name] = value
2507 # The Python default value for this parameter, as a Python value.
2508 # Or the magic value "unspecified" if there is no default.
2509 # Or the magic value "unknown" if this value is a cannot be evaluated
2518 # "default" converted into a C value, as a string.
2522 # "default" converted into a Python value, as a string.
2526 # The default value used to initialize the C variable when
2534 # This value is specified as a string.
2535 # Every non-abstract subclass should supply a valid value.
2559 # Custom converters should always use the default value of 'O&'.
2600 fail("{}: default value {!r} for field {} is not of type {}".format(
2920 fail("char_converter: illegal default value " + repr(self.default))
3611 fail("The only legal default value for Py_buffer is None.")
3827 # The Python default value for this parameter, as a Python value.
3828 # Or the magic value "unspecified" if there is no default.
3836 s = ', '.join(name + '=' + repr(value) for name, value in kwargs.items())
3957 node = node.value
4113 def directive_set(self, name, value):
4117 value = value.format_map({
4122 self.clinic.__dict__[name] = value
4554 # so assume there was no actual default value.
4568 fail("Function " + self.function.name + " has an invalid parameter declaration (default value?):\n\t" + line)
4586 value = NULL
4589 value = unspecified
4591 fail("You can't specify py_default without specifying a default value!")
4594 fail("Vararg can't take a default value!")
4634 # if they specify a c_default, we can be more lenient about the default value.
4637 value = eval(default)
4638 if value == unspecified:
4639 fail("'unspecified' is not a legal default value!")
4643 fail("Malformed expression given as default value\n"
4646 fail("Unsupported expression as default value: " + repr(default))
4648 expr = module.body[0].value
4649 # mild hack: explicitly support NULL as a default value
4651 value = NULL
4659 type(expr.operand.value) in (int, float, complex)))
4663 fail("When you specify an expression (" + repr(default) + ") as your default value,\nyou MUST specify a valid c_default." + ast.dump(expr))
4665 value = unknown
4671 n = n.value
4673 fail("Unsupported default value " + repr(default) + " (looked like a Python constant)")
4679 fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
4682 value = eval(py_default)
4684 value = unknown
4686 value = ast.literal_eval(expr)
4687 py_default = repr(value)
4688 if isinstance(value, (bool, None.__class__)):
4690 elif isinstance(value, str):
4691 c_default = c_repr(value)
4698 value = unknown
4702 fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
4713 converter = dict[name](c_name or parameter_name, parameter_name, self.function, value, **kwargs)
4726 if value is not unspecified:
4727 fail("A 'self' parameter cannot have a default value.")
4741 if value is not unspecified:
4742 fail("A 'defining_class' parameter cannot have a default value.")
4749 p = Parameter(parameter_name, kind, function=self.function, converter=converter, default=value, group=self.group)
4763 type(annotation.value) is str):
4764 return annotation.value, True, {}
4778 kwargs = {node.arg: eval_ast_expr(node.value, symbols) for node in annotation.keywords}
5023 value = p.converter.py_default
5024 if not value:
5025 value = repr(p.converter.default)
5026 p_add(value)
5148 for name, value in self.function.parameters.items():
5149 if not value:
5151 value.docstring = value.docstring.rstrip()