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.

classification
Title: urlparse.parse_qs with empty string
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: r.david.murray, stutiredboy
Priority: normal Keywords:

Created on 2013-11-13 14:07 by stutiredboy, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg202751 - (view) Author: stutiredboy (stutiredboy) Date: 2013-11-13 14:07
>>> import urlparse
>>> urlparse.parse_qs('a=&b=1')
{'b': ['1']}
>>> 

why not:

{'a' : [''], 'b' : ['1']}

is this a bug?
msg202753 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-11-13 14:30
It is not a bug:

>>> parse_qs('a=&b=1', keep_blank_values=True)
{'a': [''], 'b': ['1']}
History
Date User Action Args
2022-04-11 14:57:53adminsetgithub: 63770
2013-11-13 14:30:38r.david.murraysetstatus: open -> closed

type: behavior

nosy: + r.david.murray
messages: + msg202753
resolution: not a bug
stage: resolved
2013-11-13 14:07:14stutiredboycreate