Hacker News new | ask | show | jobs
by sidmitra 1046 days ago
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
1 comments

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

    b.foo.lol = True