Module Cookie :: Class SimpleCookie
[hide private]
[frames] | no frames]

type SimpleCookie

object --+        
         |        
      dict --+    
             |    
    BaseCookie --+
                 |
                SimpleCookie

SimpleCookie SimpleCookie supports strings as cookie values. When setting the value using the dictionary assignment notation, SimpleCookie calls the builtin str() to convert the value to a string. Values received from HTTP are kept as strings.

Instance Methods [hide private]
 
value_decode(self, val)
real_value, coded_value = value_decode(STRING) Called prior to setting a cookie's value from the network representation.
 
value_encode(self, val)
real_value, coded_value = value_encode(VALUE) Called prior to setting a cookie's value from the dictionary representation.

Inherited from BaseCookie: __init__, __repr__, __setitem__, __str__, js_output, load, output

Inherited from dict: __cmp__, __contains__, __delitem__, __eq__, __ge__, __getattribute__, __getitem__, __gt__, __hash__, __iter__, __le__, __len__, __lt__, __ne__, __new__, clear, copy, fromkeys, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Method Details [hide private]

value_decode(self, val)

 

real_value, coded_value = value_decode(STRING) Called prior to setting a cookie's value from the network representation. The VALUE is the value read from HTTP header. Override this function to modify the behavior of cookies.

Overrides: BaseCookie.value_decode
(inherited documentation)

value_encode(self, val)

 

real_value, coded_value = value_encode(VALUE) Called prior to setting a cookie's value from the dictionary representation. The VALUE is the value being assigned. Override this function to modify the behavior of cookies.

Overrides: BaseCookie.value_encode
(inherited documentation)