We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2607315 commit 75eff10Copy full SHA for 75eff10
1 file changed
vm/src/obj/objtype.rs
@@ -220,8 +220,9 @@ impl PyClassRef {
220
}
221
222
fn type_mro(cls: PyClassRef, vm: &VirtualMachine) -> PyObjectRef {
223
- vm.ctx
224
- .new_list(cls.mro.iter().map(|x| x.clone().into_object()).collect())
+ let mut mro = vec![cls.clone().into_object()];
+ mro.extend(cls.mro.iter().map(|x| x.clone().into_object()));
225
+ vm.ctx.new_list(mro)
226
227
228
/*
0 commit comments