Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's there on the readme/pypi home for both; unless i'm misunderstanding what you mean by "chained"

    from box import Box
    movie_box = Box({ "Robin Hood: Men in Tights": { "imdb stars": 6.7, "length": 104 } })
    movie_box.Robin_Hood_Men_in_Tights.imdb_stars


    from munch import Munch
    b = Munch()
    b.hello = 'world'
    b.foo = Munch(lol=True)
    b.foo.lol


Chained means in your second example this would work without manually creating a new instance:

    b.foo.lol = True




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: