Nathaniel Smith <[email protected]> added the comment:
I think I agree with Serhiy here... the whole difference between run([a]) and
run(a) is that in the first case 'a' is treated as a path, and in the second it
isn't. This distinction long predates pathlib.
Say I have an oddly named binary with an embedded space in its name:
bin = Path("/bin/ls -l")
# Check that this weird file actually exists:
assert bin.exists()
# runs this weird file
subprocess.run([bin])
# Currently an error; if this is implemented, would run
# /bin/ls, and pass it the -l argument. Refers to something
# completely different than our .exists() call above.
subprocess.run(bin)
----------
nosy: +njs
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31961>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com