[issue9723] Add shlex.quote
R. David Murray
report at bugs.python.org
Fri Jul 29 17:20:13 CEST 2011
R. David Murray <rdmurray at bitdance.com> added the comment:
You aren't using a regex to replace the quotes, either.
>>> len('abcd'.translate(str.maketrans('', '', string.ascii_letters ))) > 0
False
I don't know if this is faster than the corresponding search regex, but depending on how much overhead regex has, it might be. Note that the translate table can be pre-built, just like the compiled regex.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9723>
_______________________________________
More information about the Python-bugs-list
mailing list