Message245432
If you read the documentation for urllib.parse.urlencode [1], you'll
see that it says:
The value element in itself can be a sequence and in that case, if
the optional parameter doseq is evaluates to True, individual
key=value pairs separated by '&' are generated for each element of
the value sequence for the key.
So you need to write:
>>> urllib.parse.urlencode(thisDict, doseq=True)
'SomeVar3=ghi&SomeVar1=abc&SomeVar2=def'
[1]: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode |
|
Date |
User |
Action |
Args |
2015-06-17 08:53:38 | gdr@garethrees.org | set | recipients:
+ gdr@garethrees.org, drueter@assyst.com |
2015-06-17 08:53:38 | gdr@garethrees.org | set | messageid: <1434531218.47.0.128599472889.issue24460@psf.upfronthosting.co.za> |
2015-06-17 08:53:38 | gdr@garethrees.org | link | issue24460 messages |
2015-06-17 08:53:37 | gdr@garethrees.org | create | |
|