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
We have PyDict::as_mapping, PyList::as_sequence, and PyTuple::as_sequence.
With the new Bound API, ownership matters, so we might want to add versions of these methods which transfer ownership.
PyDict::into_mapping
PyList::into_sequence
PyTuple::as_sequence
maybe?
(The equivalent alternative at the moment is to use the unsafe .downcast_into_unchecked::<Mapping>() etc, but that also runs up against the friction observed with deref & ownership in #3980)
The text was updated successfully, but these errors were encountered:
We have
PyDict::as_mapping
,PyList::as_sequence
, andPyTuple::as_sequence
.With the new Bound API, ownership matters, so we might want to add versions of these methods which transfer ownership.
PyDict::into_mapping
PyList::into_sequence
PyTuple::as_sequence
maybe?
(The equivalent alternative at the moment is to use the unsafe
.downcast_into_unchecked::<Mapping>()
etc, but that also runs up against the friction observed with deref & ownership in #3980)The text was updated successfully, but these errors were encountered: