Lines Matching full:comments
586 """Get lines of comments immediately preceding an object's source code.
602 comments = []
605 comments.append(string.expandtabs(lines[end]))
607 return string.join(comments, '')
609 # Look for a preceding block of comments at the same indentation.
615 comments = [string.lstrip(string.expandtabs(lines[end]))]
620 comments[:0] = [comment]
624 while comments and string.strip(comments[0]) == '#':
625 comments[:1] = []
626 while comments and string.strip(comments[-1]) == '#':
627 comments[-1:] = []
628 return string.join(comments, '')