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
Make chain.from_iterable an alias for a new chain_iterable. #62952
Comments
It has become apparent from various discussions in recent months that chain.from_iterable is at least as useful as chain. In fact, I now think that 'chain' should have been what chain.from_iterable is, with current chain(a,b,c) done as chain((a,b,d)). But too late for that. Based on today's pydev post* by Eric Smith, I propose that chain_iterable (or chain_from_iterable, but I think the 'from' is not needed) be added to itertools and listed in the index table and documented as a function in its own right. This would make the long discussion of how to properly document chain.from_iterable (bpo-18301) moot, as the method could be simply mentioned as a (deprecated) alias of chain_iterable.
I think itertools.combinations and itertools.combinations_with_replacement is the better example of related If this proposal is rejected, then chain.iterable should be added to the index table. That would make it more discoverable, but not less confusing. |
I'll work on improving the docs to make this classmethod more discoverable in docs, but the API is going to stay the same. |
New changeset fa1fa88b685b by Raymond Hettinger in branch 'default': |
New changeset 23f77dc58979 by Raymond Hettinger in branch '3.3': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: