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

Pop or Delete method #7

Open
jmgamboa opened this issue Aug 23, 2022 · 1 comment
Open

Pop or Delete method #7

jmgamboa opened this issue Aug 23, 2022 · 1 comment

Comments

@jmgamboa
Copy link

Hey! Great work here! Read the source and noticed pop wasn't implemented as a python dictionary's pop method. Any idea of a work around here? Essentially trying to rename a key, given a pre-existing path

@mkrd
Copy link
Owner

mkrd commented Oct 15, 2022

@jmgamboa It exists, and behaves just like a regular dict pop. It does not accept paths, but you can always get the nested pathdict, and use the pop method there, eg pd["u1", "friends"].pop("u2")

@mkrd mkrd closed this as completed Oct 26, 2022
@mkrd mkrd reopened this Oct 26, 2022
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