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

Implement DoubleEndedIterator for PyTupleIterator #3366

Merged
merged 2 commits into from
Aug 8, 2023
Merged

Conversation

adamreichold
Copy link
Member

@adamreichold adamreichold commented Aug 3, 2023

No description provided.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I agree with the functionality! I guess the same for list is more tricky due to possible mutation during iteration? (Though we guard against that IIRC.)

Just a few review comments...

src/types/mod.rs Show resolved Hide resolved
src/buffer.rs Outdated Show resolved Hide resolved
src/types/tuple.rs Show resolved Hide resolved
@adamreichold
Copy link
Member Author

Thanks, I agree with the functionality! I guess the same for list is more tricky due to possible mutation during iteration? (Though we guard against that IIRC.)

I added the impl for PyListIterator as a separate commit by caching the length of the list while continuing to validate it before access.

Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Looks good to me 👍

@adamreichold adamreichold added this pull request to the merge queue Aug 8, 2023
Merged via the queue into main with commit 28b8623 Aug 8, 2023
32 checks passed
@adamreichold adamreichold deleted the tuple-rev branch August 8, 2023 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants