@@ -24,7 +24,7 @@ use crate::slots::{Comparable, Hashable, Iterable, PyComparisonOp, PyIter, Unhas
2424use crate :: utils:: Either ;
2525use crate :: vm:: { ReprGuard , VirtualMachine } ;
2626use crate :: {
27- PyClassDef , PyClassImpl , PyComparisonValue , PyContext , PyIterable , PyObjectRef , PyRef ,
27+ ArgIterable , PyClassDef , PyClassImpl , PyComparisonValue , PyContext , PyObjectRef , PyRef ,
2828 PyResult , PyValue , TryFromObject , TypeProtocol ,
2929} ;
3030
@@ -196,7 +196,7 @@ impl PyList {
196196 match SequenceIndex :: try_from_object_for ( vm, needle, Self :: NAME ) ? {
197197 SequenceIndex :: Int ( index) => self . setindex ( index, value, vm) ,
198198 SequenceIndex :: Slice ( slice) => {
199- if let Ok ( sec) = PyIterable :: try_from_object ( vm, value) {
199+ if let Ok ( sec) = ArgIterable :: try_from_object ( vm, value) {
200200 return self . setslice ( slice, sec, vm) ;
201201 }
202202 Err ( vm. new_type_error ( "can only assign an iterable to a slice" . to_owned ( ) ) )
@@ -214,7 +214,7 @@ impl PyList {
214214 }
215215 }
216216
217- fn setslice ( & self , slice : PySliceRef , sec : PyIterable , vm : & VirtualMachine ) -> PyResult < ( ) > {
217+ fn setslice ( & self , slice : PySliceRef , sec : ArgIterable , vm : & VirtualMachine ) -> PyResult < ( ) > {
218218 let items: Result < Vec < PyObjectRef > , _ > = sec. iter ( vm) ?. collect ( ) ;
219219 let items = items?;
220220 let mut elements = self . borrow_vec_mut ( ) ;
0 commit comments