Skip to content

Add join function in shlex module (new in 3.8) #3430

@sarahmonod

Description

@sarahmonod

A new function was added to the stdlib shlex in python 3.8, as stated here: https://docs.python.org/3/library/shlex.html#shlex.join and in the changelog here https://docs.python.org/3/whatsnew/changelog.html and here https://bugs.python.org/issue22454

At the moment, only split has a stub:

def split(s: str, comments: bool = ..., posix: bool = ...) -> List[str]: ...

Adding join would be quite simple, and would probably look a bit like this:

def join(s: List[str]) -> str: ... 

I have not opened a PR yet because I wonder if this is something that you would want to add or not, because saying that join does not exist is true for python3.7 and lower. Surely there must be precedent, but I could not find an example of this in the issues yet.

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