String comparison

Matt Gerrans matt_gerrans at hp.com
Thu Aug 22 12:41:00 EDT 2002


"Duncan Booth" <duncan at NOSPAMrcp.co.uk> wrote in message

> I'm sorry.  <snipped sibilation>

About what, your attitude?

Or your arrogance:

> but I'm not going to tell you what it is.

> For a case insensitive comparison simply do what you did first time
around.

As I said, that is what I do.   I only mentioned the second one on the spur
of the moment while I was writing the post.    I think it is pretty obvious
that using regular expressions for simple string comparision would be
overkill and make for unnecessarily obfuscated code.

Anyway, what I was really getting at was trying find out if there was
something like C's strcmpi() tucked somewhere in Python; that seems a bit
more sensible than either lower-casing or upper-casing everthing.





More information about the Python-list mailing list