dict replacement


Keywords
dict, python
License
Unlicense
Install
pip install dict==2020.7.1

Documentation

Installation

$ [sudo] pip install dict

Features

  • attribute-style access
  • None instead of KeyError
  • safe remove
  • jQuery like methods chaining

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