New submission from Matthew Gamble <[email protected]>:
The output of the following invocations are exactly the same:
list(shlex.shlex('a ; b', posix=True, punctuation_chars=True))
list(shlex.shlex('a \; b', posix=True, punctuation_chars=True))
They both output the following:
['a', ';', 'b']
This makes it impossible to determine when the user wanted to escape the
semi-colon for some reason, such as if they were using find's `-exec` argument.
----------
components: Library (Lib)
messages: 342276
nosy: Matthew Gamble
priority: normal
severity: normal
status: open
title: shlex doesn't differentiate escaped characters in output
type: behavior
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36897>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com