2.7 grammar bug workaround. Fix docstring bug

This commit is contained in:
rocky
2016-11-24 21:41:23 -05:00
parent 8be6369bdf
commit abecb21671
8 changed files with 19 additions and 10 deletions

View File

@@ -2120,9 +2120,9 @@ class SourceWalker(GenericASTTraversal, object):
docstring = ast[i][0][0][0][0].pattr
except:
docstring = code.co_consts[0]
print_docstring(self, indent, docstring)
self.println()
del ast[i]
if print_docstring(self, indent, docstring):
self.println()
del ast[i]
# the function defining a class normally returns locals(); we