Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-98363: Fix exception handling in batched() #98523

Merged
merged 5 commits into from
Oct 21, 2022

Conversation

rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Oct 21, 2022

Was erring out when an input iterator raised an exception other than StopIteration.

@rhettinger rhettinger added type-bug An unexpected behavior, bug, or error skip news labels Oct 21, 2022
@rhettinger
Copy link
Contributor Author

The inner loop is now optimally fast and clean:

LBB55_4:
	mov	x0, x22                    ; x0 <- it
	blr	x24                        ; x0 <- iternext(it);
	cbz	x0, LBB55_7                ; if (item == NULL) goto null_item;
	str	x0, [x25, x21, lsl #3]     ; items[i] = item;
	add	x21, x21, #1               ; i++
	cmp	x23, x21                   ; i < n
	b.ne	LBB55_4

@rhettinger rhettinger merged commit a5ff80c into python:main Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants