Skip to content

Commit 950dbd1

Browse files
committed
Use new_list when constructing multiplied list.
1 parent bbe333d commit 950dbd1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

vm/src/obj/objlist.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,7 @@ fn list_mul(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
252252
new_elements.extend(elements.clone());
253253
}
254254

255-
Ok(PyObject::new(
256-
PyObjectKind::Sequence {
257-
elements: new_elements,
258-
},
259-
vm.ctx.list_type(),
260-
))
255+
Ok(vm.ctx.new_list(new_elements))
261256
}
262257

263258
pub fn init(context: &PyContext) {

0 commit comments

Comments
 (0)