Grant Edwards wrote: > > So? the isdigit method tests whether all characters are digits. > > > >>>> '15'.isdigit() > > True > > But that is "obviously" wrong, since '15' is not a digit.
no, but all characters in the string belongs to the "digit" character
class, which is what the "is" predicates look for.
cf.
>>> "\t".isspace()
True
>>> "Life of Brian".istitle()
False
>>> u"\N{GREEK CAPITAL LETTER BETA}".isalpha()
True
and so on.
</F>
--
http://mail.python.org/mailman/listinfo/python-list
