On 2005-12-23, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > 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.
I know. My point was that '15'.isdigit() returning True is in my opinion "surprising" since '15' is not a digit in the most obvious meaning of the phrase. In language design, "surprise" is a bad quality. It's like saying that [1,2,3,4] is an integer. -- Grant Edwards grante Yow! Join the PLUMBER'S at UNION!! visi.com -- http://mail.python.org/mailman/listinfo/python-list