homepage

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.

classification
Title: Documentation missing pipes.quote()
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Barry.Morrison, docs@python, r.david.murray
Priority: normal Keywords:

Created on 2012年09月26日 01:09 by Barry.Morrison, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (2)
msg171326 - (view) Author: Barry Morrison (Barry.Morrison) Date: 2012年09月26日 01:09
Documentation here: http://docs.python.org/library/pipes.html makes no mention of quote()
But the link to Source code: Lib/pipes.py http://hg.python.org/cpython/file/2.7/Lib/pipes.py has:
267 def quote(file):
268 """Return a shell-escaped version of the file string."""
269 for c in file:
270 if c not in _safechars:
271 break
272 else:
273 if not file:
274 return "''"
275 return file
276 # use single quotes, and put single quotes into double quotes
277 # the string $'b is then quoted as '$'"'"'b'
278 return "'" + file.replace("'", "'\"'\"'") + "'"
First _ever_ bug report, apologies if this is incorrect.
msg171338 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012年09月26日 11:25
Thanks for the report.
pipes.quote used to be an undocumented helper function in pipes. When we decided to make it public, we moved it to the shlex module. Therefore you'll find that as of Python 3.3 the source code has moved to shlex and it is documented in the shlex documentation.
History
Date User Action Args
2022年04月11日 14:57:36adminsetgithub: 60255
2012年09月26日 11:25:56r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg171338

resolution: out of date
stage: resolved
2012年09月26日 01:09:26Barry.Morrisoncreate

AltStyle によって変換されたページ (->オリジナル) /