[Python-ideas] Changing str(someclass) to return only the class name

Antoine Pitrou solipsis at pitrou.net
Mon Oct 31 19:17:11 CET 2011


On Mon, 31 Oct 2011 10:10:28 -0700
Ethan Furman <ethan at stoneleaf.us> wrote:
> Guido van Rossum wrote:
> > In my view, str() and repr() are both for human consumption
> 
> I was under the impression that repr() was for eval consumption (when 
> possible).

Only for basic types. repr() is generally not eval()-able.

Regards

Antoine.





More information about the Python-ideas mailing list