Function script::python::rspython::vector_impl::pyobj_try_to_typed_val
source ยท pub(crate) fn pyobj_try_to_typed_val(
obj: PyObjectRef,
vm: &VirtualMachine,
dtype: Option<ConcreteDataType>,
) -> Option<Value>
Expand description
convert a PyObjectRef
into a datatypes::Value
(is that ok?)
if obj
can be convert to given ConcreteDataType then return inner Value
else return None
if dtype is None, return types with highest precision
Not used for now but may be use in future