
24 Oct
2011
24 Oct
'11
2:26 a.m.
On Sun, Oct 23, 2011 at 11:37 AM, Bruce Leban bruce@leapyear.org wrote:
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>
Fortunately, that particular example won't change, because '9'.isdigit is not a function -- it is a bound method. They're different object types.
--
--Guido van Rossum (python.org/~guido)