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
Add groupsof built-in #297
Comments
Should probably be a class, though, not a function, like |
I'm working on implementing this feature. I just need to finish up the tests and add documentation. |
@kbaskett248 Awesome! Make sure you're working against |
Sure thing. One question about the n argument: should I be validating it at all? Perhaps raise a TypeError if it can't be coerced to an int? Or maybe a ValueError if it is non-positive? I implemented it using range like you suggested, so it does throw a TypeError when the You are free to pass in negative numbers or zero, however, which achieves the same results as passing in 1. This seems really unintuitive, so I think that may be worth raising an exception. |
@kbaskett248 Raising an exception seems like a good idea, go for it! Also, just to check, you're putting this in |
Yes, I am. |
Something like
The text was updated successfully, but these errors were encountered: