Skip to content

Commit e7bf496

Browse files
jb2170picnixz
andcommitted
Tweak shlex.quote docs based on picnixz' review
Force push due to CRLF issue. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent d000ccd commit e7bf496

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/shlex.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ The :mod:`!shlex` module defines the following functions:
5050
string that can safely be used as one token in a shell command line, for
5151
cases where you cannot use a list.
5252

53-
If *force* is :const:`True` then *s* will be quoted even if it is already
54-
safe for a shell without being quoted.
53+
If *force* is :const:`True`, then *s* is unconditionally quoted,
54+
even if it is already safe for a shell without being quoted.
5555

5656
.. _shlex-quote-warning:
5757

@@ -99,7 +99,7 @@ The :mod:`!shlex` module defines the following functions:
9999

100100
>>> from shlex import quote
101101
>>> filenames = ['my first file', 'file2', 'file 3']
102-
>>> filenames_some_escaped = [quote(f, force=False) for f in filenames]
102+
>>> filenames_some_escaped = [quote(f) for f in filenames]
103103
>>> filenames_some_escaped
104104
["'my first file'", 'file2', "'file 3'"]
105105
>>> filenames_all_escaped = [quote(f, force=True) for f in filenames]

0 commit comments

Comments
 (0)