@@ -55,8 +55,9 @@ in Cookie name (as :attr:`~Morsel.key`).
|
55 | 55 | .. class:: SimpleCookie([input]) |
56 | 56 | |
57 | 57 | This class derives from :class:`BaseCookie` and overrides :meth:`value_decode` |
58 | | - and :meth:`value_encode` to be the identity and :func:`str` respectively. |
59 | | - |
| 58 | + and :meth:`value_encode`. SimpleCookie supports strings as cookie values. |
| 59 | + When setting the value, SimpleCookie calls the builtin :func:`str()` to convert |
| 60 | + the value to a string. Values received from HTTP are kept as strings. |
60 | 61 | |
61 | 62 | .. seealso:: |
62 | 63 | |
@@ -76,15 +77,16 @@ Cookie Objects
|
76 | 77 | |
77 | 78 | .. method:: BaseCookie.value_decode(val) |
78 | 79 | |
79 | | - Return a decoded value from a string representation. Return value can be any |
80 | | - type. This method does nothing in :class:`BaseCookie` --- it exists so it can be |
81 | | - overridden. |
| 80 | + Return a tuple ``(real_value, coded_value)`` from a string representation. |
| 81 | +``real_value`` can be any type. This method does no decoding in |
| 82 | +:class:`BaseCookie` --- it exists so it can be overridden. |
82 | 83 | |
83 | 84 | |
84 | 85 | .. method:: BaseCookie.value_encode(val) |
85 | 86 | |
86 | | - Return an encoded value. *val* can be any type, but return value must be a |
87 | | - string. This method does nothing in :class:`BaseCookie` --- it exists so it can |
| 87 | + Return a tuple ``(real_value, coded_value)``. *val* can be any type, but |
| 88 | + ``coded_value`` will always be converted to a string. |
| 89 | + This method does no encoding in :class:`BaseCookie` --- it exists so it can |
88 | 90 | be overridden. |
89 | 91 | |
90 | 92 | In general, it should be the case that :meth:`value_encode` and |
|