[dict] contains and extract value #261
-
How to check if a nanobind::dict object contains a key and extract its value as a specified type like float? nanobind::dict d; |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
instead of |
Beta Was this translation helpful? Give feedback.
-
Just as a follow up for anyone stumbling on this. This works:
both for arguments |
Beta Was this translation helpful? Give feedback.
instead of
.value
, useoperator[]
. Thecontains
function was indeed missing, I added in commit 654dbaa just now.