Skip to content

Latest commit

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

learn.py

Code and Notes for Python Language.


Utilities


  • 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']
  • 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)

About

Code and Notes for Python Language.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages