Index: Doc/library/http.cookies.rst =================================================================== --- Doc/library/http.cookies.rst (revision 88162) +++ Doc/library/http.cookies.rst (working copy) @@ -42,7 +42,8 @@ .. class:: SimpleCookie([input]) This class derives from :class:`BaseCookie` and overrides :meth:`value_decode` - and :meth:`value_encode` to be the identity and :func:`str` respectively. + and :meth:`value_encode` to use encoding appropriate for values outside + the alphanumeric set. .. seealso:: @@ -63,16 +64,16 @@ .. method:: BaseCookie.value_decode(val) - Return a decoded value from a string representation. Return value can be any - type. This method does nothing in :class:`BaseCookie` --- it exists so it can be - overridden. + Return a tuple ``(real_value, coded_value)`` from a string representation. + ``real_value`` can be any type. This method does no decoding in + :class:`BaseCookie` --- it exists so it can be overridden. .. method:: BaseCookie.value_encode(val) - Return an encoded value. *val* can be any type, but return value must be a - string. This method does nothing in :class:`BaseCookie` --- it exists so it can - be overridden + Return a tuple ``(real_value, coded_value)``. *val* can be any type, but + ``coded_value`` must be a string. This method does no encoding in + :class:`BaseCookie` --- it exists so it can be overridden. In general, it should be the case that :meth:`value_encode` and :meth:`value_decode` are inverses on the range of *value_decode*.