Hacker News new | past | comments | ask | show | jobs | submit login

Neat! One problem I can see is that query strings aren't dictionaries, so valid parameters can vanish:

    >>> furl('http://www.example.com?foo=1&foo=2')
    furl('http://www.example.com?foo=1')
See Werkzeug's MultiDict for one way to handle this correctly.



Query parameters as a dictionary was an ease of use tradeoff over the rarely utilized flexibility of repeated query parameters.

  https://github.com/gruns/furl/blob/master/furl.py#L142
Werkzeug's MultiDict looks like a good combination for the best of both worlds, ease of use and flexibility. Thanks for the reference.


Repeated query parameters aren't "rarely utilized" -- look at how any sort of checkbox or other multi-select works.


I have to second the MultiDict suggestion -- I was very happy to see Werkzeug had gone that route when I had to throw some Python in front of Solr.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: