10000 Implement str.__rmul__ · RustPython/RustPython@f12268f · GitHub
[go: up one dir, main page]

Skip to content

Commit f12268f

Browse files
committed
Implement str.__rmul__
1 parent a118497 commit f12268f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vm/src/obj/objstr.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ impl PyString {
198198
}
199199
}
200200

201+
#[pymethod(name = "__rmul__")]
202+
fn rmul(&self, val: PyObjectRef, vm: &VirtualMachine) -> PyResult<String> {
203+
self.mul(val, vm)
204+
}
205+
201206
#[pymethod(name = "__str__")]
202207
fn str(zelf: PyRef<Self>, _vm: &VirtualMachine) -> PyStringRef {
203208
zelf

0 commit comments

Comments
 (0)
0