[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
Sun Apr 19 21:30:05 CEST 2009
- Previous message: [Python-Dev] [Python-ideas] Proposed addtion to urllib.parse in 3.1 (and urlparse in 2.7)
- Next message: [Python-Dev] [Python-ideas] Proposed addtion to urllib.parse in 3.1 (and urlparse in 2.7)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Bill Janssen wrote:
Mart Sõmermaa <mrts.pydev at gmail.com> wrote:
On Sun, Apr 19, 2009 at 2:06 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
That said, I'm starting to wonder if an even better option may be to just drop the kwargs support from the function and require people to always supply a parameters dictionary. That would simplify the signature to the quite straightforward:
def addqueryparams(url, params, allowdups=True, sep='&') Or even better, stop trying to use a mapping, and just make the "params" value a list of (name, value) pairs. That way you can stop fiddling around with "allowdups" and just get rid of it.
Reluctant +1, it seems the best solution. You can always use {}.items() if you still want to store the params in a mapping.
Michael
Bill
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
- Previous message: [Python-Dev] [Python-ideas] Proposed addtion to urllib.parse in 3.1 (and urlparse in 2.7)
- Next message: [Python-Dev] [Python-ideas] Proposed addtion to urllib.parse in 3.1 (and urlparse in 2.7)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]