def __repr__(self):
<EOL>args = []<EOL>for item in self.flat():<EOL><INDENT>if not item:<EOL><INDENT>args.append('<STR_LIT:None>')<EOL><DEDENT>elif isinstance(item, str):<EOL><INDENT>if not isinstance(item, str):<EOL><INDENT>raise TypeError('<STR_LIT>' % item)<EOL><DEDENT>args.append(repr(item))<EOL><DEDENT>else:<EOL><INDENT>args.append(str(item))<EOL><DEDENT><DEDENT>if self.app() != _DefaultAppId():<EOL><INDENT>args.append('<STR_LIT>' % self.app())<EOL><DEDENT>if self.namespace() != _DefaultNamespace():<EOL><INDENT>args.append('<STR_LIT>' % self.namespace())<EOL><DEDENT>return '<STR_LIT>' % '<STR_LIT:U+002CU+0020>'.join(args)<EOL>
String representation, used by str() and repr().

        We produce a short string that conveys all relevant information,
        suppressing app and namespace when they are equal to the default.