mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
shlex.split() now has an optional "posix" parameter.
This commit is contained in:
parent
df25efeae9
commit
c90bc75994
3 changed files with 8 additions and 4 deletions
|
|
@ -271,8 +271,8 @@ class shlex:
|
|||
raise StopIteration
|
||||
return token
|
||||
|
||||
def split(s, comments=False):
|
||||
lex = shlex(s, posix=True)
|
||||
def split(s, comments=False, posix=True):
|
||||
lex = shlex(s, posix)
|
||||
lex.whitespace_split = True
|
||||
if not comments:
|
||||
lex.commenters = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue