You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble figuring out how to returned a typing.NamedTuple from a binding function. I wonder if anyone has any experience using those in nanobind projects?
Or would it be simplest to go ahead and use normal tuples in the bindings and add a Python wrapper that maps tuple return values to typed NamedTuples?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm having trouble figuring out how to returned a typing.NamedTuple from a binding function. I wonder if anyone has any experience using those in nanobind projects?
Or would it be simplest to go ahead and use normal tuples in the bindings and add a Python wrapper that maps tuple return values to typed NamedTuples?
Beta Was this translation helpful? Give feedback.
All reactions