Lines Matching refs:value
104 Each dictionary element has a 'value' attribute, which gives you
105 back the value associated with the key.
109 >>> C["twix"].value
114 the value to a string, when the values are set dictionary-style.
119 >>> C["number"].value
121 >>> C["string"].value
255 """A class to hold ONE (key, value) pair.
258 used to keep the attributes associated with the appropriate key,value pair.
260 the network representation of the value.
302 def value(self):
363 'value': self._value,
369 self._value = state['value']
396 # First, the key=value pair
403 for key, value in items:
404 if value == "":
408 if key == "expires" and isinstance(value, int):
409 append("%s=%s" % (self._reserved[key], _getdate(value)))
410 elif key == "max-age" and isinstance(value, int):
411 append("%s=%d" % (self._reserved[key], value))
412 elif key == "comment" and isinstance(value, str):
413 append("%s=%s" % (self._reserved[key], _quote(value)))
415 if value:
418 append("%s=%s" % (self._reserved[key], value))
442 ( # Optional group: there may not be a value.
451 )? # End of optional value group
465 Called prior to setting a cookie's value from the network
466 representation. The VALUE is the value read from HTTP
474 Called prior to setting a cookie's value from the dictionary
475 representation. The VALUE is the value being assigned.
486 """Private method for setting a cookie's value"""
491 def __setitem__(self, key, value):
493 if isinstance(value, Morsel):
495 dict.__setitem__(self, key, value)
497 rval, cval = self.value_encode(value)
504 for key, value in items:
505 result.append(value.output(attrs, header))
513 for key, value in items:
514 l.append('%s=%s' % (key, repr(value.value)))
521 for key, value in items:
522 result.append(value.js_output(attrs))
535 for key, value in rawdata.items():
536 self[key] = value
542 parsed_items = [] # Parsed (type, key, value) triples
543 morsel_seen = False # A key=value pair was previously encountered
558 key, value = match.group("key"), match.group("val")
567 parsed_items.append((TYPE_ATTRIBUTE, key[1:], value))
572 if value is None:
579 parsed_items.append((TYPE_ATTRIBUTE, key, _unquote(value)))
580 elif value is not None:
581 parsed_items.append((TYPE_KEYVALUE, key, self.value_decode(value)))
589 for tp, key, value in parsed_items:
592 M[key] = value
595 rval, cval = value
603 the value using the dictionary assignment notation, SimpleCookie
604 calls the builtin str() to convert the value to a string. Values