diff --git a/vm/src/obj/objlist.rs b/vm/src/obj/objlist.rs index 3b3d18299..e0a7b5e34 100644 --- a/vm/src/obj/objlist.rs +++ b/vm/src/obj/objlist.rs @@ -252,12 +252,7 @@ fn list_mul(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult { new_elements.extend(elements.clone()); } - Ok(PyObject::new( - PyObjectKind::Sequence { - elements: new_elements, - }, - vm.ctx.list_type(), - )) + Ok(vm.ctx.new_list(new_elements)) } pub fn init(context: &PyContext) {