PathDict icon indicating copy to clipboard operation
PathDict copied to clipboard

Pop or Delete method

Open jmgamboa opened this issue 3 years ago • 1 comments

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

jmgamboa avatar Aug 23 '22 17:08 jmgamboa

@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 avatar Oct 15 '22 19:10 mkrd