>>> u
Decodedurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fpython-hyper%2Fhyperlink%2Fissues%2Furl%3DURL.from_text%28%27https%3A%2F%2Fexample.com%2Fapi%2Fv1%2Fwebui%27))
>>> u.replace(path="support/woo")
Decodedurl(/sitelet?url=https%3A%2F%2Fgithub.com%2Fpython-hyper%2Fhyperlink%2Fissues%2Furl%3DURL.from_text%28%27https%3A%2F%2Fexample.com%2Fs%2Fu%2Fp%2Fp%2Fo%2Fr%2Ft%2F%252F%2Fw%2Fo%2Fo%27%27))
I know path is supposed to be an iterable, not a string in this case, i.e. I should have done path=["support", "woo"]. But maybe it would be more user friendly to have the internal logic be something like:
if isinstance(path, str):
path = path.split('/')
I know
pathis supposed to be an iterable, not a string in this case, i.e. I should have donepath=["support", "woo"]. But maybe it would be more user friendly to have the internal logic be something like: