diff options
author | Evan <evanunderscore@gmail.com> | 2019-06-01 19:09:22 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2019-06-01 19:09:22 (GMT) |
commit | 56624a99a916fd27152d5b23364303acc0d707de (patch) | |
tree | 469ecf27c685101302f1c9c365f394df174e68e9 /Lib/shlex.py | |
parent | 2b843ac0ae745026ce39514573c5d075137bef65 (diff) | |
download | cpython-56624a99a916fd27152d5b23364303acc0d707de.zip cpython-56624a99a916fd27152d5b23364303acc0d707de.tar.gz cpython-56624a99a916fd27152d5b23364303acc0d707de.tar.bz2 |
bpo-28595: Allow shlex whitespace_split with punctuation_chars (GH-2071)
Diffstat (limited to 'Lib/shlex.py')
-rw-r--r-- | Lib/shlex.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/shlex.py b/Lib/shlex.py index fb1130d..edea077 100644 --- a/Lib/shlex.py +++ b/Lib/shlex.py @@ -246,7 +246,8 @@ class shlex: escapedstate = 'a' self.state = nextchar elif (nextchar in self.wordchars or nextchar in self.quotes - or self.whitespace_split): + or (self.whitespace_split and + nextchar not in self.punctuation_chars)): self.token += nextchar else: if self.punctuation_chars: |