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.

Title: shlex.shlex punctuation_chars documentation should use posix=True
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.6
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, evan_, python-dev, r.david.murray, vinay.sajip
Priority: normal Keywords:

Created on 2016-11-24 07:44 by evan_, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg281612 - (view) Author: Evan Andrews (evan_) * Date: 2016-11-24 07:44
(This discussion started on issue28595.)

The new punctuation_chars keyword argument is intended to provide "compatibility with the parsing performed by common Unix shells like bash, dash, and sh", however the documentation and examples do not mention that the user should also set posix=True (which defaults to False for shlex.shlex but True for shlex.split).

Longer term (over several releases), perhaps the default for posix could be changed from False to True. Alternatively, the punctuation_chars argument could also be added to shlex.split, which would avoid having to interact with shlex.shlex directly.
msg286353 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2017-01-27 13:05
New changeset ff3312ce1d14 by Vinay Sajip in branch '3.6':
Fixes #28784: Clarified use of shlex.shlex with punctuation_chars.

New changeset 46f8188f8646 by Vinay Sajip in branch 'default':
Closes #28784: Merged update from 3.6.
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 72970
2017-01-27 13:05:18python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg286353

resolution: fixed
stage: resolved
2016-11-24 07:44:10evan_create