def __str__(self):
attrs = []<EOL>for trait_name, trait in self.traits(graphviz=True).items():<EOL><INDENT>value = getattr(self, trait_name)<EOL>if (value != trait.default) and (trait.default is not None):<EOL><INDENT>if isinstance( value, str ):<EOL><INDENT>valstr = '<STR_LIT>' % value<EOL><DEDENT>else:<EOL><INDENT>valstr = str( value )<EOL><DEDENT>attrs.append('<STR_LIT>' % (trait_name, valstr))<EOL><DEDENT><DEDENT>if attrs:<EOL><INDENT>attrstr = "<STR_LIT>" % "<STR_LIT:U+002CU+0020>".join(attrs)<EOL><DEDENT>else:<EOL><INDENT>attrstr = "<STR_LIT>"<EOL><DEDENT>edge_str = "<STR_LIT>" % ( self.tail_node.ID, self.tailport,<EOL>self.conn,<EOL>self.head_node.ID, self.headport,<EOL>attrstr )<EOL>return edge_str<EOL>
Returns a string representation of the edge.