This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients alex, cvrebert, eric.araujo, ncoghlan, pitrou
Date 2011-10-25.08:52:25
SpamBayes Score 5.737814e-08
Marked as misclassified No
Message-id <1319532746.52.0.893489260366.issue13238@psf.upfronthosting.co.za>
In-reply-to
Content
Considering this further, I've realised that the idea of implicit quoting for this style of helper function is misguided on another level - the parameters to be interpolated may not even be strings yet, so attempting to quote them would fail:

>>> subprocess.call("exit {}".format(1), shell=True)
1
>>> shlex.quote(1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ncoghlan/devel/py3k/Lib/shlex.py", line 285, in quote
    if _find_unsafe(s) is None:
TypeError: expected string or buffer

I'll note that none of these problems will be unique to the new convenience API - they're all a general reflection of the impedance mismatch between typical shell interfaces and filenames that can contain spaces.
History
Date User Action Args
2011-10-25 08:52:26ncoghlansetrecipients: + ncoghlan, pitrou, eric.araujo, alex, cvrebert
2011-10-25 08:52:26ncoghlansetmessageid: <1319532746.52.0.893489260366.issue13238@psf.upfronthosting.co.za>
2011-10-25 08:52:25ncoghlanlinkissue13238 messages
2011-10-25 08:52:25ncoghlancreate