Created
July 24, 2016 22:01
-
-
Save Alquimista/810dba81e6336ae4011f1b7f57469262 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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