Closed s-celles closed 10 years ago
That's what bunchify
is for.
>>> from bunch import bunchify
>>> bb = bunchify({"a": 0, "b": {"b1": 1, "b2": 2}})
>>> print bb.toYAML()
a: 0
b:
b1: 1
b2: 2
(I guess I really ought to generate the docs from the source, as I see the source of your confusion. It's not mentioned anywhere!)
https://github.com/dsc/bunch/blob/master/bunch/__init__.py#L224
Hello,
it will be nice if
Bunch
could recursively build a bunch of bunch from dict of dict.Example:
returns
it will be nice if it could returns
Because accessing b2 sub key can be done using:
recursively contructed Bunch could give access to b2 sub key using:
Kind regards