Commit 0df63a8e authored by Tim Peters's avatar Tim Peters

NodeInfo.__gen_init(): Fiddle so that reindent.py is

happy with the output as-is.  This incidentally also
gets rid of "an extra" blank line at the end of the output
block that probably wasn't intended (although it doesn't
matter one way or the other).
parent 8a0c398f
...@@ -113,8 +113,11 @@ class NodeInfo: ...@@ -113,8 +113,11 @@ class NodeInfo:
for name in self.argnames: for name in self.argnames:
print >> buf, " self.%s = %s" % (name, name) print >> buf, " self.%s = %s" % (name, name)
print >> buf, " self.lineno = lineno" print >> buf, " self.lineno = lineno"
if self.init: # Copy the lines in self.init, indented four spaces. The rstrip()
print >> buf, "".join([" " + line for line in self.init]) # business is to get rid of the four spaces if line happens to be
# empty, so that reindent.py is happy with the output.
for line in self.init:
print >> buf, (" " + line).rstrip()
def _gen_getChildren(self, buf): def _gen_getChildren(self, buf):
print >> buf, " def getChildren(self):" print >> buf, " def getChildren(self):"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment