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:<EOL><INDENT>trait = self.trait( trait_name )<EOL>if trait.is_trait_type( Tuple ):<EOL><INDENT>valstr  = '<STR_LIT>' % "<STR_LIT:U+002C>".join( [str(d) for d in value] )<EOL><DEDENT>elif 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>return "<STR_LIT>" % (self.ID, attrstr)<EOL><DEDENT>else:<EOL><INDENT>return "<STR_LIT:%s>" % self.ID<EOL><DEDENT>
Returns a string representation of the node.