R. David Murray added the comment:
Isn't it obvious that you have to parse before you unquote? That's the purpose
of quoting, after all. I suppose that is one of those "beginner mind" things
that is obvious only because I'm an experienced programmer...and that there are
web servers that do it wrong.
The docs could definitely use some improvement, since they don't mention that
parse_qs automatically unquotes the values...it is implicit in the fact that
urlencode with doseq=true is the inverse, and it encodes them, but it should be
made explicit.
You also might want to take note of the 'keep_blank_values' attribute, which
could also use a doc improvement (it isn't obvious from the text what 'blank
values' are):
>>> parse_qs('a=1&b=2&b=1&a%3Donly_appears_after_unquote',
>>> keep_blank_values=True)
{'a': ['1'], 'b': ['2', '1'], 'a=only_appears_after_unquote': ['']}
----------
assignee: -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, r.david.murray
versions: +Python 2.7, Python 3.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue22618>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com