Wojtek Ruszczewski added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23040>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to