Code and Notes for Python Language.
AttrDict: a mapping that allows attribute-style access, key-style access, and double star**unpacking.- Usage:
fromdictionaryimportAttrDictd=AttrDict(a=1, b=2) assertd.a==d['a']
- Usage:
Show: Compactly display the structure of an arbitrary object, like a dict, a list, etc.- Usage:
fromstructureimportShowx= {i: list(range(100)) foriinrange(100)} show=Show(max_len=10, indent='..') show(x)
- Usage: