Evan added the comment:

I have some additional concerns with the changes introduced in 
http://bugs.python.org/issue1521950:

1. The fact that posix defaults to False in shlex.shlex (but not in 
shlex.split) is a huge beginner trap. If users are expecting to use this for 
"compatibility with the parsing performed by common Unix shells like bash, 
dash, and sh", they must also remember to set posix=True. The documentation for 
punctuation_chars makes no mention of this. The examples use non-POSIX mode 
parsing rules.

2. Even with posix=True, there is no mechanism to escape characters that are 
special inside double quotes, like $. This is a separate unaddressed 
incompatibility.

For 1, this could be fixed by making posix default to True if punctuation_chars 
is specified. Longer term, perhaps the default could be changed to True in all 
cases. I'm not sure what to do about 2.

(Please let me know if I should split these out into separate issues.)

----------

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

Reply via email to