Permalink
Browse files

Optimization: don't create a new object on every Newline token!

  • Loading branch information...
Andy Chu
Andy Chu committed Nov 18, 2017
1 parent 444270d commit 4d1771a5a14acf8f71fcab3322222a1432a89dd3
Showing with 3 additions and 4 deletions.
  1. +3 −4 osh/cmd_parse.py
View
@@ -127,10 +127,9 @@ def _MaybeReadHereDocs(self):
h.body = ast.CompoundWord(parts)
h.was_filled = True
self.pending_here_docs = [] # no .clear() until Python 3.3
#print('')
#print('--> FILLED', here_docs)
#print('')
# No .clear() until Python 3.3.
del self.pending_here_docs[:]
return True
def _Next(self, lex_mode=LexMode.OUTER):

0 comments on commit 4d1771a

Please sign in to comment.