@@ -17,15 +17,15 @@ use super::PyInt;
1717use crate :: common:: lock:: {
1818 PyMappedRwLockReadGuard , PyRwLock , PyRwLockReadGuard , PyRwLockWriteGuard ,
1919} ;
20- use crate :: function:: { FuncArgs , OptionalArg } ;
20+ use crate :: function:: { ArgIterable , FuncArgs , OptionalArg } ;
2121use crate :: sequence:: { self , SimpleSeq } ;
2222use crate :: sliceable:: { PySliceableSequence , PySliceableSequenceMut , SequenceIndex } ;
2323use crate :: slots:: { Comparable , Hashable , Iterable , PyComparisonOp , PyIter , Unhashable } ;
2424use crate :: utils:: Either ;
2525use crate :: vm:: { ReprGuard , VirtualMachine } ;
2626use crate :: {
27- PyClassDef , PyClassImpl , PyComparisonValue , PyContext , PyIterable , PyObjectRef , PyRef ,
28- PyResult , PyValue , TryFromObject , TypeProtocol ,
27+ PyClassDef , PyClassImpl , PyComparisonValue , PyContext , PyObjectRef , PyRef , PyResult , PyValue ,
28+ TryFromObject , TypeProtocol ,
2929} ;
3030
3131/// Built-in mutable sequence.
@@ -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