Hi,

I currently have a dictionary object that I'm doing the following with:

if lib not in stage_map:
    # ... do stuff ...

However, this will perform a case-sensitive comparison between lib and each
key in stage_map. Is there a way to make this do a case-insensitive
comparison instead? Yes, I realize I could do this:

if lib not in [key.lower() for key in stage_map]

However, I don't want to do this because it'll quickly end up getting messy.
I want this solution to be an absolute last resort. I'm not a pro with
python, so I'm hoping there are cleaner alternatives out there. Thanks.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to