urlencode() doseq and Python 3.0

T

Thomas Guettler

Hi,

I think the default of urlencode doseq being false is just
there to preserve the old behavior.


http://svn.python.org/view/python/b...ib/parse.py?rev=66199&sortby=date&view=markup

{{{
...
if not doseq:
# preserve old behavior
}}}

I guess no one want really wants this:
urllib.urlencode({'key': ['value1', 'value2']})
'key=%5B%27value1%27%2C+%27value2%27%5D'

I think this is what most people want:
urllib.urlencode({'key': ['value1', 'value2']}, doseq=True)
'key=value1&key=value2'


Should I open a bug against 3.0?

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top