Skip to content
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

Support more than one argument in .join() #65

Closed
humitos opened this issue Mar 30, 2016 · 1 comment
Closed

Support more than one argument in .join() #65

humitos opened this issue Mar 30, 2016 · 1 comment

Comments

@humitos
Copy link

humitos commented Mar 30, 2016

I think a good idea is to support more than just one argument to .join(). Example:

>>> url = furl('http://my-api-endpoint.com')
>>> url.join('order')
furl('http://my-api-endpoint.com/order')
>>> order_id = 98127
>>> url.join('order', order_id, 'status')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: join() takes exactly 2 arguments (4 given)
>>> 

This should support the encoding and other powered things from furl. I imagine this similar to the os.path.join function.

Thanks!

@gruns
Copy link
Owner

gruns commented Apr 5, 2016

Wonderful suggestion. furl.join() now supports multiple arguments in furl v0.4.93. E.g.

>>> from furl import furl
>>> furl().join('http://google.com/', 'tmp', 'path/k', '#sup').url
'http://google.com/path/k#sup'

Upgrade with

pip install --upgrade furl

Thank you again for your suggestion Manuel. Don't hesitate to let me know if there's anything else I can do for you.

@gruns gruns closed this as completed Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants