diff --git a/cozo-lib-python/src/lib.rs b/cozo-lib-python/src/lib.rs index f5533ffb..1d1cccce 100644 --- a/cozo-lib-python/src/lib.rs +++ b/cozo-lib-python/src/lib.rs @@ -58,6 +58,13 @@ fn py_to_value(ob: &PyAny) -> PyResult { DataValue::Bytes(b.as_bytes().to_vec()) } else if let Ok(b) = ob.downcast::() { DataValue::Bytes(unsafe { b.as_bytes() }.to_vec()) + } else if let Ok(l) = ob.downcast::() { + let mut coll = Vec::with_capacity(l.len()); + for el in l { + let el = py_to_value(el)?; + coll.push(el) + } + DataValue::List(coll) } else if let Ok(l) = ob.downcast::() { let mut coll = Vec::with_capacity(l.len()); for el in l {