Title: URL.add supporting a list of values · Issue #182 · python-hyper/hyperlink · GitHub
Open Graph Title: URL.add supporting a list of values · Issue #182 · python-hyper/hyperlink
X Title: URL.add supporting a list of values · Issue #182 · python-hyper/hyperlink
Description: I occasionally find myself making multiple URL.add method calls in a loop to add a list of values to the same query parameter name. If I'm not alone, perhaps it would be nice to add support for passing a list of values to URL.add? For ex...
Open Graph Description: I occasionally find myself making multiple URL.add method calls in a loop to add a list of values to the same query parameter name. If I'm not alone, perhaps it would be nice to add support for pas...
X Description: I occasionally find myself making multiple URL.add method calls in a loop to add a list of values to the same query parameter name. If I'm not alone, perhaps it would be nice to add support for...
Opengraph URL: https://github.com/python-hyper/hyperlink/issues/182
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"URL.add supporting a list of values","articleBody":"I occasionally find myself making multiple `URL.add` method calls in a loop to add a list of values to the same query parameter name. If I'm not alone, perhaps it would be nice to add support for passing a list of values to `URL.add`?\r\n\r\nFor example:\r\n```python\r\n>>> # This currently returns a list of values.\r\n>>> values = URL.from_text('?foo=1&foo=2').get('foo')\r\n>>> values\r\n['1', '2']\r\n>>> # This is currently a TypeError\r\n>>> URL.add('foo', values)\r\nURL.from_text('?foo=1&foo=2')\r\n```\r\n\r\nWhile looping over a single list and making multiple `add` calls isn't much effort, when working with a dictionary of parameters that I'd like to build a URL out of, and the dictionary may or may not have a list of values for some of the keys, I find the code needed to check each dictionary value and loop over the lists a bit messy.\r\n\r\nEdit: I'm willing to put work into a PR for the feature, if the feature is considered a good addition.","author":{"url":"https://github.com/ddormer","@type":"Person","name":"ddormer"},"datePublished":"2023-05-23T11:28:22Z","url":"https://github.com/python-hyper/hyperlink/issues/182"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:75cebcc7-0bbb-0b4a-502e-c7cc8b24c54b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA68:48D18:36218B9:4817FF9:6B06E7A1 |
| html-safe-nonce | 3ba31dbc4921b88020e502705ac4a55ead468c455ecc436b68fb473ffdec0088 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTY4OjQ4RDE4OjM2MjE4Qjk6NDgxN0ZGOTo2QjA2RTdBMSIsInZpc2l0b3JfaWQiOiIyNzcyMTg4MTk3Nzc2OTc1Nzc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fcb07523295e93d6e5b1e568975ddb82487977f60afad6396130cf945713b049 |
| hovercard-subject-tag | issue:1721862259 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-hyper/hyperlink/182/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e50702a1a96275cb05ac92b78c698dc6c6be95931c2e34436dec9c7ae8130006/python-hyper/hyperlink/issues/182 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e50702a1a96275cb05ac92b78c698dc6c6be95931c2e34436dec9c7ae8130006/python-hyper/hyperlink/issues/182 |
| og:image:alt | I occasionally find myself making multiple URL.add method calls in a loop to add a list of values to the same query parameter name. If I'm not alone, perhaps it would be nice to add support for pas... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ddormer |
| hostname | github.com |
| expected-hostname | github.com |
| None | 351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/hyperlink git https://github.com/python-hyper/hyperlink.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 82321340 |
| octolytics-dimension-repository_nwo | python-hyper/hyperlink |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82321340 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/hyperlink |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af8913cd0f2f77c41796be449ac66a9108825abc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width