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 wrwrwr
Recipients docs@python, r.david.murray, wrwrwr
Date 2014-12-12.17:30:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1418405420.67.0.0646374777583.issue23040@psf.upfronthosting.co.za>
In-reply-to
Content
I was looking at the sentence:
"When query parameter is a str, the safe, encoding and error parameters are passed down to quote_plus() for encoding."

The query argument can't be a string itself (gives a TypeError with 3.5a0 and I think it's only intended to accept dicts or sequences of 2-tuples). The "parameter" then must refer to a component of the query -- a key or a value.

The safe argument is passed down and is effective no matter if a component is of str or bytes type (or a sequence with doseq), for example:

>>> urlencode({b'/ n': ''}, safe='/')
'/+n='
(note the "b"; without "safe" the slash would get encoded as %2F).

Maybe it would also be good to change "query parameter" to "query component" in that sentence.
History
Date User Action Args
2014-12-12 17:30:20wrwrwrsetrecipients: + wrwrwr, r.david.murray, docs@python
2014-12-12 17:30:20wrwrwrsetmessageid: <1418405420.67.0.0646374777583.issue23040@psf.upfronthosting.co.za>
2014-12-12 17:30:20wrwrwrlinkissue23040 messages
2014-12-12 17:30:20wrwrwrcreate