Skip to content

re.split has seemingly unnecessary Anys #7940

Closed
@GrantGryczan

Description

@GrantGryczan

I would think that the | Anys in the following four return types should be removed.

def split(self: Pattern[str], string: str, maxsplit: int = ...) -> list[str | Any]: ...

def split(self: Pattern[bytes], string: ReadableBuffer, maxsplit: int = ...) -> list[bytes | Any]: ...

def split(pattern: str | Pattern[str], string: str, maxsplit: int = ..., flags: _FlagsType = ...) -> list[str | Any]: ...

) -> list[bytes | Any]: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions