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

Michael Foord fuzzyman at voidspace.org.uk
Mon Apr 13 13:53:10 CEST 2009


Antoine Pitrou wrote:

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.

Weird or not, is there actually a need to remove query parameters?

Michael

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

Regards Antoine.


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk

-- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog



More information about the Python-Dev mailing list