mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Replace dead code with an assert.
Now that COMMENT tokens are reliably followed by NL or NEWLINE, there is never a need to add extra newlines in untokenize.
This commit is contained in:
parent
76467ba6d6
commit
39c532c0b6
1 changed files with 1 additions and 4 deletions
|
|
@ -168,10 +168,7 @@ def __init__(self):
|
|||
|
||||
def add_whitespace(self, start):
|
||||
row, col = start
|
||||
while row > self.prev_row:
|
||||
print row, "<", self.prev_row
|
||||
self.tokens.append("\n")
|
||||
self.prev_row += 1
|
||||
assert row <= self.prev_row
|
||||
col_offset = col - self.prev_col
|
||||
if col_offset:
|
||||
self.tokens.append(" " * col_offset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue