
March 27, 2009
5:13 p.m.
Mart Sõmermaa <mrts.pydev@gmail.com> wrote:
Appending query parameters to a URL is a very common need. However, there's nothing in urllib.parse (and older urlparse) that caters for that need.
Therefore, I propose adding the following to 2.7 and 3.1 in the respective libs:
>>> add_query_params('http://foo.com?a=b', b='c', d='q')
To begin with, I wouldn't use keyword params. They're syntactically more restrictive than the rules for application/x-www-form-urlencoded allow, so you start by ruling out whole classes of URLs. Bill