Skip to content

Instantly share code, notes, and snippets.

@Alquimista
Created July 24, 2016 22:01
Show Gist options
  • Save Alquimista/810dba81e6336ae4011f1b7f57469262 to your computer and use it in GitHub Desktop.
Save Alquimista/810dba81e6336ae4011f1b7f57469262 to your computer and use it in GitHub Desktop.
class CaseInsensitiveDict(dict):
def __setitem__(self, key, value):
super(CaseInsensitiveDict, self).__setitem__(key.lower(), value)
def __getitem__(self, key):
return super(CaseInsensitiveDict, self).__getitem__(key.lower())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment