I V wrote:

> On Fri, 29 Feb 2008 08:18:54 -0800, baku wrote:
>>     return s == s.upper()
> 
> A couple of people in this thread have used this to test for an upper
> case string. Is there a reason to prefer it to s.isupper() ?

Note that these tests are not equivalent:

>>> s = "123"
>>> s.isupper(), s.upper() == s
(False, True)

Peter

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to