This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients docs@python, drueter@assyst.com, gdr@garethrees.org, martin.panter, r.david.murray
Date 2015-06-20.01:29:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1434763759.4.0.0553450565888.issue24460@psf.upfronthosting.co.za>
In-reply-to
Content
1. urlencode(): I agree the documentation is unclear. But David Rueter’s suggestion does not help much. I think doseq=True is meant to also work for a mapping query (as in original post), and is not required in the sequence-of-tuples mode if each tuple has a single parameter value. Perhaps something like this could work instead:

“When a sequence of two-element tuples is used as *query*, the first element of each tuple is a key and the second specifies one or more values. If *doseq* is true, each *query* (mapping or sequence) item can specify a sequence of values; if *doseq* is false (the default), each item specifies a single value. The order of parameters in the encoded string will match the order of items in *query* and the order of values in an item.”

2. urlopen(data=...) and Request(data=...): I don’t see the contradiction. It looks like David Rueter’s suggestion only changes the first sentence, to say doseq=True is required to get the urlencoded format, but this is not required. See also Issue 23360 about my own problems with this bit of the documentation.

3. Examples: Again, I do not see why doseq=True should be shown when it is simpler without. But an example of when it is useful would be good, as R David Murray suggested.
History
Date User Action Args
2015-06-20 01:29:19martin.pantersetrecipients: + martin.panter, r.david.murray, docs@python, gdr@garethrees.org, drueter@assyst.com
2015-06-20 01:29:19martin.pantersetmessageid: <1434763759.4.0.0553450565888.issue24460@psf.upfronthosting.co.za>
2015-06-20 01:29:19martin.panterlinkissue24460 messages
2015-06-20 01:29:17martin.pantercreate