urllib.urlencode has 2 parameters??

Matthew D. Wood woodm at equire.com
Wed Nov 21 02:13:33 EST 2001


I understand that there is documentation for the vast majority of the
python modules.  In point of fact, I stated that I had been looking at
the documentation for urlencode in my original post.

I don't understand what the documentation is trying to say.

"If any values in the query arg are sequences..."  Isn't query
supposed to be a sequence to begin with?  (I know that it can also be
a dict.)  I even tried it with a list of tuples, which is a sequence
of sequences, nothing changed when I changed the parameter from 1 to
0.  I don't get it.

My hope was that someone else had struggled through what I had, and
that everyone (myself especailly) could benefit from their time.

In short, I know that I should always RTFM, I just don't understand
what TFM is saying.


> On 20-Nov-2001 Matthew D. Wood wrote:
> > I've been staring at the documentation page for urllib for about 15
> > minutes, and experimenting around on the python-command-line trying to
> > figure out what the second parameter for urllib.urlencode does.

> 
> def urlencode(query, doseq=0):
> If any values in the query arg are sequences and doseq is true, each
>     sequence element is converted to a separate parameter.
> 
> That is from urllib.urlencode.__doc__.  Also, most of python's modules are in
> python so you can just read the urllib.py file and it is explained there in
> comments and code.
> 
> 
> > -- 
> > http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list