[Python-Dev] [Python-ideas] Proposed addtion to urllib.parse in 3.1 (and urlparse in 2.7) (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Mon Apr 13 12:19:13 CEST 2009


Mart Sõmermaa <mrts.pydev gmail.com> writes:

On Mon, Apr 13, 2009 at 12:56 AM, Antoine Pitrou <solipsis pitrou.net> wrote: Mart Sõmermaa <mrts.pydev gmail.com> writes: > > Proposal: add addqueryparams() for appending query parameters to an URL to urllib.parse and urlparse. Is there anything to /remove/ a query parameter? I'd say this is outside the scope of addqueryparams().

Given the name of the proposed function, sure. But it sounds a bit weird to have a function dedicated to adding parameters and nothing to remove them.

You could e.g. rename the function to update_query_params() and decide that every parameter whose specified value is None must atcually be removed from the URL.

Regards

Antoine.



More information about the Python-Dev mailing list