How to delete a key from pybind11::dict #3889
-
Hi, is it possible to delete a key form dict? |
Beta Was this translation helpful? Give feedback.
Answered by
Skylion007
Apr 21, 2022
Replies: 1 comment 1 reply
-
You can access any Python functions or attributes through the attr methods. py::dict d;
d["key"] = "value";
auto discarded_val = d.attr("pop")("key"); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Skylion007
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can access any Python functions or attributes through the attr methods.