@@ -167,7 +167,6 @@ impl PyListRef {
167
167
fn reverse ( self , _vm : & VirtualMachine ) {
168
168
self . elements . borrow_mut ( ) . reverse ( ) ;
169
169
}
170
-
171
170
fn reversed ( self , _vm : & VirtualMachine ) -> PyListReverseIterator {
172
171
let final_position = self . elements . borrow ( ) . len ( ) ;
173
172
PyListReverseIterator {
@@ -406,6 +405,10 @@ impl PyListRef {
406
405
vm. ctx . new_list ( new_elements)
407
406
}
408
407
408
+ fn rmul ( self , counter : isize , vm : & VirtualMachine ) -> PyObjectRef {
409
+ self . mul ( counter, & vm)
410
+ }
411
+
409
412
fn imul ( self , counter : isize , _vm : & VirtualMachine ) -> Self {
410
413
let new_elements = seq_mul ( & self . elements . borrow ( ) . as_slice ( ) , counter)
411
414
. cloned ( )
@@ -878,6 +881,7 @@ pub fn init(context: &PyContext) {
878
881
"__setitem__" => context. new_rustfunc( PyListRef :: setitem) ,
879
882
"__reversed__" => context. new_rustfunc( PyListRef :: reversed) ,
880
883
"__mul__" => context. new_rustfunc( PyListRef :: mul) ,
884
+ "__rmul__" => context. new_rustfunc( PyListRef :: rmul) ,
881
885
"__imul__" => context. new_rustfunc( PyListRef :: imul) ,
882
886
"__len__" => context. new_rustfunc( PyListRef :: len) ,
883
887
"__new__" => context. new_rustfunc( list_new) ,
0 commit comments