Python Cookies module? Bugs?
Andrew M. Kuchling
akuchlin at mems-exchange.org
Fri Oct 22 14:51:47 EDT 1999
junkster at nospam.rochester.rr.com (Benjamin Schollnick) writes:
> > cookie["anketa_id"] = str(1024)
> > cookie["anketa_id"]["expires"] = time.strftime("%a, %d-%b-%Y %T GMT", t)
> > cookie["anketa_id"]["path"] = "/"
> Why setup the cookie equaling a string w/length of 1024??
No, no; this is assigning the cookie a value of '1024'; str(x)
converts the value of the variable 'x' to a string. This presumably
creates an internal object (amusingly called a Morsel) which holds the value.
The second and third assignments then work as expected.
--
A.M. Kuchling http://starship.python.net/crew/amk/
"There is no disputing about tastes," says the old saw. In my experience there
is little else.
-- Robertson Davies, _Marchbanks' Almanac_
More information about the Python-list
mailing list