homepage

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 someone3x7
Recipients someone3x7
Date 2011年06月23日.03:02:44
SpamBayes Score 7.350225e-06
Marked as misclassified No
Message-id <1308798165.99.0.217904560432.issue12390@psf.upfronthosting.co.za>
In-reply-to
Content
"""
Per the documentation urlencode is supposed to encode a structure returned by parse_qs back to a query string. However, urlencode appears to not be processing the lists associated with each key.
Example:
"""
import urllib.parse
dictQuery = urllib.parse.parse_qs('a=b&b=c&c=d&c=e',
 strict_parsing=True,
 encoding='iso8859-1')
assert isinstance(dictQuery,dict)
assert isinstance(dictQuery['a'],list)
strQuery = urllib.parse.urlencode(dictQuery, encoding='iso8859-1')
print(strQuery)
""" 
Outputs: a=%5B%27b%27%5D&c=%5B%27d%27%2C+%27e%27%5D&b=%5B%27c%27%5D
Which means: a=['b']&c=['d', 'e']&b=['c']
Expected: a=b&c=d&c=e&b=c
"""
History
Date User Action Args
2011年06月23日 03:02:46someone3x7setrecipients: + someone3x7
2011年06月23日 03:02:45someone3x7setmessageid: <1308798165.99.0.217904560432.issue12390@psf.upfronthosting.co.za>
2011年06月23日 03:02:45someone3x7linkissue12390 messages
2011年06月23日 03:02:44someone3x7create

AltStyle によって変換されたページ (->オリジナル) /