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

Bruce Leban bruce at leapyear.org
Sun Oct 23 20:37:14 CEST 2011


One advantage of the way it works now is that if you have a class, function
or module when you're not expecting it, print tells you what's going on.
Compare these:

>>> print('9'.isdigit)
isdigit


vs

>>> print('9'.isdigit)
<built-in method isdigit of str object at 0x01D5A038>


--- Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111023/1511d411/attachment.html>


More information about the Python-ideas mailing list