This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients belopolsky, eric.araujo, georg.brandl, gvanrossum, ncoghlan, petri.lehtinen, terry.reedy
Date 2011-10-18.16:40:39
SpamBayes Score 0.00039415897
Marked as misclassified No
Message-id <>
> I sometimes wish that the str() of a class would return the class name
> rather than its repr(); that way "print(str)" would print "str"
> instead of <class 'str'>.  (Use case: printing an exception and its
> message: I wish I could print("%s: %s" % (err.__class__, err)) instead
> of having to use err.__class__.__name__.)
Me too.  I have a small metaclass to do that :)  Given your tentative support, I’ll open a feature request for 3.3.

> One could even claim that the repr() of a class could be the same
I think of repr first as “string form for debugging”, so I like the angle brackets.
Date User Action Args
2011-10-18 16:40:40eric.araujosetrecipients: + eric.araujo, gvanrossum, georg.brandl, terry.reedy, ncoghlan, belopolsky, petri.lehtinen
2011-10-18 16:40:40eric.araujosetmessageid: <>
2011-10-18 16:40:39eric.araujolinkissue868845 messages
2011-10-18 16:40:39eric.araujocreate