Skip to main content
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!

Easy use dictionaries with specific features

Project Description

All kind of dictionaries you always think but never do.

Check the full documentation site

Instalation

To install dicts form Pypi:

easy_install dicts

or

pip install dicts

if you want to install it from source code:

python setup.py install

Usage

Dictionaries Features

  • join:

    >>> d1 = Dict({1 : 7, 2 : [1,2], 3 : 'a'})
    >>> d1.join({1 : 2, 2 : [3], 3 : 'b'})
    {1: 9, 2: [1, 2, 3], 3: 'ab'}
    
  • map:

    >>> d = Dict({'1' : 1, '2' : 2})
    >>> d.map(lambda x: 1/3.0)
    >>> d
    {'1': 0.3333333333333333, '2': 0.3333333333333333}
    
  • fromrepetitions:

    >>> Dict.fromrepetitions([1,1,1,1,2])
    {1: 4, 2: 1}
    
  • relookup:

    >>> d = Dict({'1': 1, '2' : 2, 'c' : 3})
    >>> d.relookup('\d')
    [('1', 1), ('2', 2)]
    

Especific dictionaries

  • SortedDict family
  • NoCaseDict
  • RegexpDict
Release History

Release History

This version
History Node

0.3.1

History Node

0.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

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
dicts-0.3.1.tar.gz (6.2 kB) Copy SHA256 Checksum SHA256 Source Oct 22, 2011

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