This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Dictionary with case-insensitive keys

Project Description

dicti is a dictionary with case-insensitive keys.

It works like the normal dict except that key matching is case-insensitive.

Instantiate like you would instantiate a normal dict; for example, these work.

dict(foo = ‘bar’, answer = 42) dicti(foo = ‘bar’, answer = 42)

dict({‘foo’: ‘bar’, ‘answer’: 42}) dicti({‘foo’: ‘bar’, ‘answer’: 42})

Methods that accept keys and have side-effects record the original case, just as a normal dictionary does.

di = dicti() di[‘cAsE’] = 1 di.keys() == [‘cAsE’] di[‘Case’] = 1 di.keys() == [‘Case’] di[‘caSE’] == 1

Methods that accept keys do the same thing regardless of what case you pass the key in.

Keys are still stored in their original case, however; the original keys are presented when you request them with methods like dicti.keys.

Release History

Release History

This version
History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
dicti-0.0.1.tar.gz (15.6 kB) Copy SHA256 Checksum SHA256 Source May 3, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting