Skip to content

split: deprecate keep option in favor of filtering #20628

@StefanKarpinski

Description

@StefanKarpinski

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    collectionsData structures holding multiple items, e.g. setsdesignDesign of APIs or of the language itselfstrings"Strings!"

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions