<div dir="ltr">On Thu, Sep 4, 2008 at 5:14 PM, Robert Dailey <span dir="ltr"><<a href="mailto:rcdailey@gmail.com">rcdailey@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi,<br><br>I currently have a dictionary object that I'm doing the following with:<br><br>if lib not in stage_map:<br>    # ... do stuff ...<br><br>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:<br>

<br>if lib not in [key.lower() for key in stage_map]<br><br>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.<br>

</div>
</blockquote></div><br>I forgot to mention that I'm using Python 3.0 beta 2.<br></div>