-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to remove a query value while retaining others #774
Comments
|
Assigning an argument to none A separate method is fine too, but given A single method is definitely more convenient - imagine the use case of mutating and renaming an existing query parameter. url.update_query(old=None, new=func(url.query['old'])) vs url.update_query(new=func(url.query['old'])).remove_query('old') Either is an improvement, but I think the first is more ergonomic. |
I disagree: for As for |
I also stumbled upon an earlier discussion mentioning the ambiguity of |
Is your feature request related to a problem?
I have a situation where I would like to get a query parameter, do something with it, and then pass the URL onto a lower layer without that single query param.
The current API is awkward for this.
Describe the solution you'd like
It would be nice to be able to pass kwargs to
update_query
withNone
value and have that remove those specific query params.Today this throws a
TypeError
Describe alternatives you've considered
Today you can accomplish this, but its somewhat awkward:
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: