A case-insensitive ordered dictionary for Python
nocasedict A case-insensitive ordered dictionary for Python. Class NocaseDict is a case-insensitive ordered dictionary that preserves the original lexical case of its keys. Example: $ python >>> from nocasedict import NocaseDict >>> dict1 = NocaseDict({‘Alpha’: 1, ‘Beta’: 2}) >>> dict1[‘ALPHA’] # Lookup by key is case-insensitive 1 >>> print(dict1) # Keys are returned with the original lexical case NocaseDict({‘Alpha’: 1, ‘Beta’: 2}) The NocaseDict class supports the functionality of the built-in dict class of Python 3.8 on all Python versions […]
Read more