Skip to content

Add encode kwarg to .to_string() #191

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jaimergp
Copy link
Contributor

Not sure if this is an acceptable submission, but I found a need to stringify some (simpler) PURL-derivatives and I'd like to have control over the encoding. Mimicking .to_dict()'s API, I propose exposing this boolean in to_string().

If you don't like to give this option in that method because you fear people misuse it, may I suggest adding a different one like to_unencoded_string() or to_unsafe_string() to discourage usage?

Thanks for taking a look!

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

Successfully merging this pull request may close these issues.

1 participant