cookie setting

John J. Lee jjl at pobox.com
Mon May 12 18:58:50 EDT 2003


John J Lee <jjl at pobox.com> writes:

> On Mon, 12 May 2003, Dave Harrison wrote:
[...]
> > I assume this is what encode and decode are meant to do ? (I could be
> > wrong) ...
> 
> Yes, but you're supposed to override those methods to do what you want.
> Looking at the source code will tell you faster than I can -- it's very
> simple.

Hmm, not as clear as I might have been.  The class actually calls
value_encode itself when you set items:

cookie["name"] = "to be encoded"


So you don't actually call value_encode yourself -- you just override
it in a subclass of Cookie, and let Cookie call it for you.


John




More information about the Python-list mailing list