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

split: deprecate keep option in favor of filtering #20628

Open
StefanKarpinski opened this issue Feb 16, 2017 · 2 comments
Open

split: deprecate keep option in favor of filtering #20628

StefanKarpinski opened this issue Feb 16, 2017 · 2 comments
Labels
collections Data structures holding multiple items, e.g. sets design Design of APIs or of the language itself strings "Strings!"
Milestone

Comments

@StefanKarpinski
Copy link
Sponsor Member

The keep option to split, in addition to being somewhat unfortunately named (probably my doing if we excavate), is kind of strange since we can accomplish the same thing by writing filter(!isempty, split(str, splitter)). If we had a generator version of split then this could even be just as efficient as split(str, splitter, keep=false).

Related: #20625

@ararslan ararslan added collections Data structures holding multiple items, e.g. sets design Design of APIs or of the language itself strings "Strings!" labels Feb 16, 2017
@Hydrotoast
Copy link

Started a generator version of split here: #20603

@StefanKarpinski
Copy link
Sponsor Member Author

This can't happen until 2.0 in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets design Design of APIs or of the language itself strings "Strings!"
Projects
None yet
Development

No branches or pull requests

3 participants