andrewpetrochenkov / dict.py

:snake: dict replacement
The Unlicense
8 stars 2 forks source link
python

Installation

$ [sudo] pip install dict

Features

Examples

>>> from dict import dict

>>> 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

readme42.com