Python Cookies module? Bugs?

Benjamin Schollnick junkster at nospam.rochester.rr.com
Sat Oct 23 05:59:05 EDT 1999


On Fri, 22 Oct 1999 18:51:47, akuchlin at mems-exchange.org (Andrew M. 
Kuchling) wrote:

> 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.

Sometimes I forget that Python uses a different function names
from pascal.

In that case, the code is doing exactly the same thing I am, at
work.

I'll have to dig a little deeper to see why I'm having trouble
with the cookie attributes.

<sigh>

			- Benjamin
====================================================
          (Remove "NoSpam" to Email me)
====================================================
Please feel free to copy any and or all of this sig.
A little something for spam bots:

root at localhost postmaster at localhost admin at localhost
abuse at localhost postmaster at 127.0.0.1

Chairman William Kennard: bkennard at fcc.gov 
Commissioner Susan Ness: sness at fcc.gov
Commissioner Harold Furchtgott-Roth: hfurchtg at fcc.gov
Commissioner Michael Powell: mpowell at fcc.gov
Commissioner Gloria Tristani: gtristan at fcc.gov
consumerline at ftc.gov
fccinfo at fcc.gov
ssegal at fcc.gov





More information about the Python-list mailing list