Skip to content

Commit a1761d2

Browse files
committed
self.{A,C} -> self.lit_{a,c}
1 parent c25e7d6 commit a1761d2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

‎Lib/shlex.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def __init__(self, instream=None, infile=None, posix=False,
5151
self.escapedquotes = b'"' if self.binary else '"'
5252
self.includequote = self.escapedquotes
5353
self.space = b' ' if self.binary else ' '
54-
self.A = b'a' if self.binary else 'a'
55-
self.C = b'c' if self.binary else 'c'
54+
self.lit_a = b'a' if self.binary else 'a'
55+
self.lit_c = b'c' if self.binary else 'c'
5656
self.state = self.space
5757
self.pushback = deque()
5858
self.lineno = 1
@@ -181,21 +181,21 @@ def read_token(self):
181181
self.instream.readline()
182182
self.lineno += 1
183183
elif self.posix and nextchar in self.escape:
184-
escapedstate = self.A
184+
escapedstate = self.lit_a
185185
self.state = nextchar
186186
elif nextchar in self.wordchars:
187187
self.token = nextchar
188-
self.state = self.A
188+
self.state = self.lit_a
189189
elif nextchar in self.punctuation_chars:
190190
self.token = nextchar
191-
self.state = self.C
191+
self.state = self.lit_c
192192
elif nextchar in self.quotes:
193193
if not self.posix:
194194
self.token = nextchar
195195
self.state = nextchar
196196
elif self.whitespace_split:
197197
self.token = nextchar
198-
self.state = self.A
198+
self.state = self.lit_a
199199
else:
200200
self.token = nextchar
201201
if self.token or (self.posix and quoted):
@@ -215,7 +215,7 @@ def read_token(self):
215215
self.state = self.space
216216
break
217217
else:
218-
self.state = self.A
218+
self.state = self.lit_a
219219
elif (self.posix and nextchar in self.escape and self.state
220220
in self.escapedquotes):
221221
escapedstate = self.state
@@ -235,7 +235,7 @@ def read_token(self):
235235
self.token += self.state
236236
self.token += nextchar
237237
self.state = escapedstate
238-
elif self.state in (self.A, self.C):
238+
elif self.state in (self.lit_a, self.lit_c):
239239
if not nextchar:
240240
self.state = None # end of file
241241
break
@@ -256,7 +256,7 @@ def read_token(self):
256256
break # emit current token
257257
else:
258258
continue
259-
elif self.state == self.C:
259+
elif self.state == self.lit_c:
260260
if nextchar in self.punctuation_chars:
261261
self.token += nextchar
262262
else:
@@ -267,7 +267,7 @@ def read_token(self):
267267
elif self.posix and nextchar in self.quotes:
268268
self.state = nextchar
269269
elif self.posix and nextchar in self.escape:
270-
escapedstate = self.A
270+
escapedstate = self.lit_a
271271
self.state = nextchar
272272
elif (nextchar in self.wordchars or nextchar in self.quotes
273273
or (self.whitespace_split and

0 commit comments

Comments
 (0)