Skip to content

Genericize AbstractString predicates to all iterables #47219

@jariji

Description

@jariji

contains, occursin, startswith, endswith all require AbstractString (or similar) arguments. I don't see why they couldn't be generic.

The only problem is that they currently are unclear on whether the first argument is an element or a sequence of elements: does occursin mean "is an element of" or "is a subsequence of"? The docs say it's the latter but occursin('a', "abc") works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requestsiterationInvolves iteration or the iteration protocol

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions