Comment 1 for bug 215052

Revision history for this message
scoder (scoder) wrote :

The code in Nodes.py goes like this:

  class PyClassDefNode(StatNode, BlockNode):
    def __init__(self, pos, name, bases, doc, body):
        # ...
        self.doc = doc
        # ...
        if self.doc and Options.docstrings:
            if Options.embed_pos_in_docstring:
                doc = 'File: %s (starting at line %s)'%relative_position(self.pos)
            doc = doc + '\\n' + self.doc
            doc_node = ExprNodes.StringNode(pos, value = doc)
        else:
            doc_node = None

I have no idea what the

    doc = doc + '\\n' + self.doc

bit is supposed to mean. It looks like it's there for a purpose...