from furl import furl
def url() -> furl:
return furl("http://foo.com/?a=1&b=2")
print(url().set({"a": 3})) # http://foo.com/?a=3
print(url().add({"a": 3})) # http://foo.com/?a=1&b=2&a=3
# i would like to be able do this in one method:
print(url().remove(["a"]).add({"a": 3})) # http://foo.com/?b=2&a=3
the current behavior of add where it supports multiple query params with the same value seems like an edge case imo
the current behavior of
addwhere it supports multiple query params with the same value seems like an edge case imo