Skip to content

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

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

Closed
sarahmonod opened this issue Oct 31, 2019 · 2 comments
Closed

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

sarahmonod opened this issue Oct 31, 2019 · 2 comments

Comments

@sarahmonod
Copy link

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.

@utkarsh2102
Copy link
Contributor

Hi,
With #3319 already in progress, I think you could open a PR with:
if sys.version_info >= (3, 8): :)
Also, @srittau would know better :)

@srittau
Copy link
Collaborator

srittau commented Oct 31, 2019

Thanks for the report. shlex.join() was added in #3358.

@srittau srittau closed this as completed Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants