bpo-31464: asdl_c.py no longer emits trailing spaces in Python-ast.h. (#3568)

This commit is contained in:
Serhiy Storchaka 2017-09-15 06:28:22 +03:00 committed by Benjamin Peterson
parent b2e5794870
commit 5d84cb368c
2 changed files with 62 additions and 61 deletions

View File

@ -94,8 +94,9 @@ class EmitVisitor(asdl.VisitorBase):
else:
lines = [s]
for line in lines:
line = (" " * TABSIZE * depth) + line + "\n"
self.file.write(line)
if line:
line = (" " * TABSIZE * depth) + line
self.file.write(line + "\n")
class TypeDefVisitor(EmitVisitor):