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

Allow passing before_and_after remainders into before_and_after again #650

Merged
merged 6 commits into from Oct 15, 2022

Conversation

gleb-akhmerov
Copy link
Contributor

Issue reference

#649

Changes

This PR allows to pass the remainder of before_and_after into before_and_after again without triggering a RecursionError. See the linked issue and the new test for more info.

@gleb-akhmerov gleb-akhmerov changed the title Patch 1 Allow passing before_and_after remainders into before_and_after again Oct 15, 2022
@bbayles
Copy link
Collaborator

bbayles commented Oct 15, 2022

Nice solution!

tests/test_recipes.py Outdated Show resolved Hide resolved
Co-authored-by: Bo Bayles <bbayles@gmail.com>
@bbayles
Copy link
Collaborator

bbayles commented Oct 15, 2022

Ah, now flake8 is angry...

@gleb-akhmerov
Copy link
Contributor Author

Are magic numbers okay in this case?

@bbayles
Copy link
Collaborator

bbayles commented Oct 15, 2022

Yeah, looks like just a long line left.

@bbayles bbayles merged commit 7e910e0 into more-itertools:master Oct 15, 2022
@gleb-akhmerov gleb-akhmerov deleted the patch-1 branch October 15, 2022 02:35
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.

Passing before_and_after remainder into before_and_after again causes RecursionError
2 participants