-
-
Notifications
You must be signed in to change notification settings - Fork 46
Allow keypaths to preserve order #404
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
Labels
enhancement
New feature or request
Comments
@mucmch I agree with adding a "sorted" parameter to keypaths method (defaults to Do you want to submit a PR with a couple tests? |
Did a simple implementation, but do not manage to commit to Github. I attached a patch file. |
New user of benedict here, and I could benefit from this "sorted" parameter. I'll submit a PR shortly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given a benedict dictionary d, invoking d.keypaths() will return all paths in a sorted order.
There are cases where this is an undesired behavior and is caused by
kps.sort()
in benedict.core.keypaths.py.I would propose a new parameter "sorted" to keypaths that allows to disable this line of code.
The text was updated successfully, but these errors were encountered: