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

rename DecodedURL to Link since it's usually what people want #159

Open
glyph opened this issue Mar 18, 2021 · 0 comments
Open

rename DecodedURL to Link since it's usually what people want #159

glyph opened this issue Mar 18, 2021 · 0 comments

Comments

@glyph
Copy link
Collaborator

glyph commented Mar 18, 2021

Our recent exciting foray into making handling of + more correct (#129) had some exciting consequences for our codebase at work, but in ways that were surprisingly hard to detect. I found lots of code that other folks had written using selective string replacements and urllib.parse to work around URL's behavior in various places, since more often than not what people want to use hyperlink for is to take an application-level value and send it to another application via encoding in a URL segment or query parameter value, and DecodedURL is not very discoverable unless you're starting with the docs rather than reading any existing code or exploring the library interactively.

I think that it would make sense to move to a naming structure and documentation that reflects that DecodedURL is what you want by default, although the tools available in EncodedURL are valuable and necessary to achieve specific effects sometimes.

I propose that hyperlink.Link would work best for this high-level naming.

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

1 participant