Message232565
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. |
|
Date |
User |
Action |
Args |
2014-12-12 17:30:20 | wrwrwr | set | recipients:
+ wrwrwr, r.david.murray, docs@python |
2014-12-12 17:30:20 | wrwrwr | set | messageid: <1418405420.67.0.0646374777583.issue23040@psf.upfronthosting.co.za> |
2014-12-12 17:30:20 | wrwrwr | link | issue23040 messages |
2014-12-12 17:30:20 | wrwrwr | create | |
|