Richard <nyuszik...@gmail.com> added the comment:

While it may be primarily intended to combine output from shlex.split() again, 
IMO it's useful for manually constructed command lines as well, for example 
displaying instructions to a user where a path may contain spaces and special 
characters and needs to be properly escaped.

As for converting int to str, since subprocess.run() does not do that, 
shlex.split() does not need to do so either. I never mentioned that, and while 
I could see that being useful as well, that would have to be a separate 
discussion.

There's more of a case for automatic conversion for Path objects, which are 
supposed to work seamlessly in most places where strings are accepted. But such 
quirks of certain functions not accepting them and being forced to convert to 
str manually makes pathlib a little annoying to use compared to os.path.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45130>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to