We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
flatten
>>> (range(2) for _ in range(2)) |> flatten |> list []
but
>>> (range(2) for _ in range(2)) |> flatten |> iter |> list [0, 1, 0, 1]
Looks like list() constructor does notice __len__ and calls it first, and flatten.__len__ consumes the generator.
list()
__len__
flatten.__len__
The text was updated successfully, but these errors were encountered:
Good catch! I thought I added a test for that case, but I guess not.
Sorry, something went wrong.
Fix flatten len
1fe6bde
Resolves #583.
Your response time is incredible, thanks!
010d382
No branches or pull requests
but
Looks like
list()
constructor does notice__len__
and calls it first, andflatten.__len__
consumes the generator.The text was updated successfully, but these errors were encountered: