def __repr__(self): <EOL>
parts = [u'<STR_LIT>' % self.ver_str]<EOL>if bool(self.metadata):<EOL><INDENT>parts.append(u'<STR_LIT>' % self.metadata)<EOL><DEDENT>column_meta = []<EOL>for col, col_meta in self.column.items():<EOL><INDENT>if bool(col_meta):<EOL><INDENT>column_meta.append(u'<STR_LIT>' % (col, col_meta))<EOL><DEDENT>else:<EOL><INDENT>column_meta.append(u'<STR_LIT>' % col)<EOL><DEDENT><DEDENT>if bool(column_meta):<EOL><INDENT>parts.append(u'<STR_LIT>' % '<STR_LIT:\n>'.join(column_meta))<EOL><DEDENT>elif len(self.column):<EOL><INDENT>parts.append(u'<STR_LIT>' % '<STR_LIT:U+002CU+0020>'.join(self.column.keys()))<EOL><DEDENT>else:<EOL><INDENT>parts.append(u'<STR_LIT>')<EOL><DEDENT>if bool(self):<EOL><INDENT>parts.extend([<EOL>u'<STR_LIT>' % (row, u'<STR_LIT>'.join([<EOL>((u'<STR_LIT>' % (col, data[col]))if col in data else(u'<STR_LIT>' % col)) for colin self.column.keys()]))<EOL>for (row, data) in enumerate(self)<EOL>])<EOL><DEDENT>else:<EOL><INDENT>parts.append(u'<STR_LIT>')<EOL><DEDENT>class_name = self.__class__.__name__<EOL>return u'<STR_LIT>' % (<EOL>class_name, u'<STR_LIT:\n>'.join(parts), class_name<EOL>)<EOL>
Return a representation of this grid.