Skip to content

dzyim/learn.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

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:
      from dictionary import AttrDict
      
      d = AttrDict(a = 1, b = 2)
      assert d.a == d['a']
  • Show: Compactly display the structure of an arbitrary object, like a dict, a list, etc.

    • Usage:
      from structure import Show
      
      x = {i: list(range(100)) for i in range(100)}
      show = Show(max_len=10, indent='..')
      show(x)

About

Code and Notes for Python Language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages