We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab284c8 commit 821f3e7Copy full SHA for 821f3e7
1 file changed
stdlib/src/array.rs
@@ -1290,9 +1290,13 @@ mod array {
1290
impl PyArrayIterator {
1291
#[pymethod(magic)]
1292
fn reduce(&self, vm: &VirtualMachine) -> PyTupleRef {
1293
- self.internal
+ let tuple = self.internal
1294
.lock()
1295
- .builtins_iter_reduce(|x| x.clone().into(), vm)
+ .builtins_iter_reduce(|x| x.clone().into(), vm);
1296
+ let func = tuple[0].clone();
1297
+ let obj = tuple[1].clone();
1298
+ let pos = self.position.load(atomic::Ordering::SeqCst);
1299
+ vm.new_tuple((func, obj, pos,))
1300
}
1301
1302
0 commit comments