dict replacement - attribute-style access, None instead of KeyError, safe remove
Project description
Install
github.com: pip install git+git://github.com/russianidiot/dict.py.git
pypi.python.org: pip install dict
download: python setup.py install
or setup/.setup.py develop.command
Usage
from dict import *
dict(k="v")["k"]
>>> "v"
dict(k="v").k
>>> "v"
dict(k="v")["not_existing"]
>>> None
dict(k="v").not_existing
>>> None
dict(k="v").get("K",i=True) # case insensitive
>>> "v"
dict(k="v").remove("k").update(k2="v2") # jquery like chain
Tested: python 2.6, 2.7, 3+
Bug Tracker: github.com/russianidiot/dict.py/issues
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dict-0.0.2.tar.gz
(5.1 kB
view hashes)